I've been trying to make a Dialog to sell an item, the script (its a server script btw) works in Studio, but in a local server it doesn't work at all, it doesn't even register the event, the script is under a dialog
local this = script.Parent local sellEvent = game.ReplicatedStorage.Remotes:WaitForChild("sellDialogEvent") function CalculateGain(count,value) return count * value end this.DialogChoiceSelected:Connect(function(plr,dialog) if dialog == this.sell then local obj = plr.Backpack:FindFirstChild("Cute") or plr.Character:FindFirstChild("Cute") if obj then local count = obj:WaitForChild("Count").Value local value = obj:WaitForChild("Value").Value local reward = CalculateGain(count,value) plr.leaderstats.Gold.Value = plr.leaderstats.Gold.Value + reward obj:Destroy() dialog.ResponseDialog = "Nice business with ya, enjoy your reward!" end end end)
I've tried testing the event if it registers with a test script but it doesn't work either.
script.Parent.DialogChoiceSelected:Connect(function() print("test") end)
So, why doesn't it register? Please help!