I want it so when you click on the NPC that the dialog appears. It shows that I can click on it but the dialog isn't popping up. This is the script that I am using.
NPC = script.Parent
Screen = game.StarterGui.FirstTextGui
Frame = Screen.FirstTextBox
Text = Frame.FirstText
Button = Text.NextButton
Talk = false
function onClicked()
if Talk == false then
Screen.Enabled = true
Frame.Visible = true
Text.Visible = true
Button.Visible = true
Talk = true
elseif Talk == true then
Screen.Enabled = false
Frame.Visible = false
Text.Visible = false
Button.Visible = false
Talk = false
end
end
NPC.ClickDetector.MouseClicked:connect(onClicked)
It doesn't seem to work so please try to help me as much as possible since I am very new at Lua.

2 comments
This is fantastic! I had to tinker it a little bit, but it still worked fine!
:D