#Code isnt working, how do i fix

1 messages · Page 1 of 1 (latest)

green palm
#

i need help

#

local leaderstats = game.Players.LocalPlayer:WaitForChild("leaderstats")
local value = leaderstats:WaitForChild("Cash")

script.Parent.Text = "$"..tostring(value.Value)

value.Changed:Connect(function()
script.Parent.Text = "$"..tostring(value.Value)
end)

#

also in another script:
local Cash = 0
script.Parent.ClickDetector.MouseClick:Connect(function()
Cash = Cash + 1
print("player has", Cash, "Cash")
end)

#

if it has something to do with it

median ruin
#

you never change the player cash value

#

you just change the local variable

green palm