So I had made a code, and I made a script, but it didn't increase the value. Any solutions?
Faulty code:
enabled = true
script.Parent.Touched:connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") and enabled and script.Parent.Useable == true then
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
player.leaderstats.Money.Value = player.leaderstats.Money.Value + 100
script.Parent.Useable.Value = false
script.Parent.Parent.TQ1.Useable = true
wait(1)
enabled = true
end
end)
