enabled = true
script.Parent.Touched:connect(function(hit)
humanoid = hit.Parent:FindFirstChild("Humanoid")
if humanoid ~= nil and enabled == true then
enabled = false
player = game.Players:GetPlayerFromCharacter(hit.Parent)
cash = player.leaderstats.Points
cash.Value = cash.Value + 50000
wait(10)
enabled = true
end
end)
This is a script i made for a tycoon. I have cash on the leaderboard, the dropper adds cash to a block, i can collect that cash, and it works with the upgrade buttons, but when i touch the brick to give me cash, the separate brick, it gives me 50,000 cash, but it doesn't save. So say i have 10 cash from the amount the dropper gave me, and then i go onto the brick that gives me 50,000 cash, it adds to the leaderboard, but then if i go get the cash from the dropper, say like 10 more cash, it switches from 50,010, to just 20. How do i fix this?

3 comments
Nothing looks wrong with this script. Share the script for the collecting the dropper cash.
I agree, nothing's wrong with your script :P
But it doesn't save it, it just shows it but it really didn't change the actual value, like I said