location = script.Parent.Parent.Parent
regen = script.Parent.Parent
save = regen:clone()
function onClicked()
back = save:clone()
wait(1)
back.Parent = location
back:MakeJoints()
end
wait(15)
function onClicked()
back = save:clone()
wait(1)
back.Parent = location
back:MakeJoints()
end
function onClicked(hit)
if hit.Parent.Humanoid~= nil then
cash = game.Players:findFirstChild(hit.Parent.Name).leaderstats.Cash -- Find out who touched.
if cash.Value >= 100 then
cash.Value = cash.Value- 100
end
end
end
script.Parent.Touched:connect(onClicked)
The script is to make a car respawn, but cost money if you click the button to respawn it again. Respawn works, but remove cash does not. Any suggestions?

3 comments
cash.Value = cash.Value - 100 and cash.Value = cash.Value- 100 both work. So does cash.Value = cash.Value-100 and cash.Value = cash.Value -100
could you place it back in the script? I have a hard time seeing what you are trying to say
You don't need a capital in findfirstchild, it's perfectly fine as it it.