#Code isnt working, how do i fix
1 messages · Page 1 of 1 (latest)
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
so how do i fix it