Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Dialog script won't replicate and show GUI, any help?

Can someone tell me why this dialog buy script isn't working? it doesn't output any errors at all and if it's an FE problem can someone tell me how to fix it?

Discord: Unknown Intelligence#6569

script.Parent.DialogChoiceSelected:connect(function(player,dialog)
 local gui = script.Parent.ShopGUI
 if dialog.Name=="Buy" then 
  gui:Clone().Parent = player.PlayerGui
 end
end)

2 comments

0

Try setting "Enabled" to true on the ScreenGui or make all the GuiObjects visible

0

They're all 100% visible I made sure of that, if it's placed in StarterGui it's all visible, it's just not being replicated

2 answers

✓ Accepted answer

the .DialogChoiceSelected event only runs in LocalScripts

yeah, it's redundant to have a player argument if it only works on the client, but it is what it is

if that's already a localscript then you should know that LocalScripts only run in ReplicatedFirst, PlayerGui, PlayerScripts, and the player's character

in this case i'd recommend putting the script in StarterGui or StarterPlayerScripts

the .DialogChoiceSelected event only runs in LocalScripts

yeah, it's redundant to have a player argument if it only works on the client, but it is what it is

if that's already a localscript then you should know that LocalScripts only run in ReplicatedFirst, PlayerGui, PlayerScripts, and the player's character

in this case i'd recommend putting the script in StarterGui or StarterPlayerScripts

This discussion is preserved as it was. New answers, comments, and votes are closed.