Here is the code:
local Player = game.Players.LocalPlayer
local Leaderstats = Player:WaitForChild("leaderstats")
script.Parent.DialogChoiceSelected:connect(function(player,dialog)
if dialog.Name=="Yes" then
if Leaderstats.Cash.Value > 249999 then
Leaderstats.Cash.Value = 0
Leaderstats.Rep.Value = 0
Leaderstats.Rebirths.Value = Leaderstats.Rebirths.Value + 1
end
end
end)
It for some reason doesn't work, idk why. I've tried it and tried it, but it still doesn't work. Please help me!

3 comments
Any errors that appear in 'Output' on Studio?
Why are you doing this in a local script?
It should be in a normal script?