I'm trying to make a reset block so when the player touches this part, their leaderstats will restart. But it doesn't work.
function onTouched(hit)
local player = game:GetService("Players"):GetPlayerFromCharacter(hit.Parent)
if player then
player.leaderstats.Cash.Value = 0
end
end

1 comment
Yes It works!