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

Why doesn't my Dialog script work in Roblox Studio play test but not in a server?

Asked by 6 years ago

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!

0
DialogChoiceSelected does not work for FilteringEnabled. You will want to use custom dialogs. User#19524 175 — 6y
0
wait so it just straight up doesn't work? I've been struggling with this issue twice, and the answer is that is simply doesn't work? Why does it even exist in the first place while roblox makes people turn on FIltering enabled? Also why do they not even mention it anywhere that it doesn't work? am really confused but i guess thats an issue "fixed" lol thanks for the response HilyrHere 79 — 6y

Answer this question