(ANSWERED) How do I make the ClickDetector work twice?
Asked by
5 years ago Edited 5 years ago
Introduction
I have a script in which when the player clicks on the item, a GUI appears. But once they click "Done" and the GUI disappears, when the player clicks the item again, it doesn't come back. Here is my script:
01 | script.Parent.MouseClick:connect( function (player) |
02 | if not player.PlayerGui:findFirstChild( "NPCDialog" ) then |
03 | local newgui = workspace.MainGameScript.NPCDialog:clone() |
04 | newgui.Parent = player.PlayerGui |
05 | local newdialog = script.Parent.Dialog:clone() |
06 | newdialog.Parent = newgui.ControlDialog |
07 | newgui.ControlDialog.Disabled = false |
09 | Instance.new( "BoolValue" ,newgui).Name = "Ready" |
Conclusion
Can somebody help me?