Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Dialog doesn't open shop. Can this be fixed?

Asked by 4 years ago
Edited 4 years ago

So basically I made a shop GUI that is scripted and works, but using dialog from an NPC to open it doesn't. I put in this script which in theory should work but doesn't. Anybody know how to fix it? Script:

script.Parent.DialogChoiceSelected:connect(function(player,dialog)
 local gui = script.Parent.Shop -- Change Shop To The Name Of The Gui.
 if dialog.Name== "yes" then -- Change The yes To The Name Of The Dialog Choice.
  gui:Clone().Parent = player.PlayerGui
 end
end)

Answer this question