inputluadialogroblox

Roblox script to enter dialog chat


I need a script so that when you press E on the keyboard it will open up the chat with an npc I already have the dialog inside the head that I want to use. I also already have the code for detecting when you press E.

game:GetService("UserInputService").InputEnded:Connect(function(input,event)
    if input.KeyCode == Enum.KeyCode.E then
        print("Activated")
        workspace.NPC.Head.Dialog.InUse = true --This is the code I expect to open up the dialog.
    end
end)

Solution

  • game:GetService("UserInputService").InputEnded:Connect(function(input,event)
        if input.KeyCode == Enum.KeyCode.E then
            print("Activated")
            workspace.NPC.Head.Dialog.SomeGui.Visible= true -- example
        end
    end)