I have two scripts and some remotes already put into ReplicatedStorage. I need to fire those events when a player clicks on dialog. I have a local script in Playergui (StarterGui) to detect when the events are fired and enable a specific shop based on the event fire. The problem is it does not not work, but there are no errors. Can someone please tell me what I'm doing wrong. Also, one more thing to mention is the fact that when I put print int here, it doesn't print, and also, the NPC no longer replies when an option is clicked.
Local script under dialog
local dia = script.Parent
local tog = game.ReplicatedStorage.Events.Shop
dia.DialogChoiceSelected:Connect(function(player, dialog)
tog:FireClient(dialog.Name)
end)
The LocalScript under the PlayerGui
local tog = game.ReplicatedStorage:WaitForChild('Events'):WaitForChild('Shop')
local shop
tog.OnClientEvent:Connect(function(dialog)
shop = script.Parent:WaitForChild(dialog)
shop.Enabled = true
end)
One more thing. I VERY MUCH prefer to not use "StackEdit" Could Administrators possibly give us a little checkbox saying "Would you like to enable StackEdit" That would be very much appreciated

13 comments
you don't need different remote events for each shop. You can just send the client 'dialog.Name' and have the local script match it with a shop
ok
Do I need to do something for it to be sent over, how do I utilize what it sends...
When you use :FireClient() make sure to set its player parameter, ex. :FireClient(player), you can also give the remote values with other parameters, such as :FireClient(player, 101) where 101 would be the first item in the OnClientEvent function parameters
Ok I think i get it
Someone correct me if i'm wrong but basically, when i do "FireClient" I could put "tog0:FireClient(player, dialog.Name)" and then when recieving it I could put "tog0.OnClinetEvent:Connect(function(player, dialog)" and dialog would be the name of the dialog they chose
correct, but only the 'dialog' will be passed to the client not the player:"tog0.OnClientEvent:Connect(function(dialog)"
ok thx
Ok I did that, now I just need to solve my problem
is there any errors? infinite yield?
is 'shop' a frame?
It says no errors in the des.
I can't answer any more questions, got sleep and school, won't be home till 2:50 p.m Central Time