I am finishing up my game and I want it to reset the stats from the leaderboard back to default numbers once I travel through the final teleport. I can't understand why it isn't working. Here is the script I have so far.
local plr = game.Players:GetPlayerByUserId()
script.Parent.Touched:connect(function(hit)
if hit and hit.Parent and hit.Parent:FindFirstChild("Humanoid") then
local Lives = plr.leaderstats.Souls;
local Stage = plr.leaderstats.Stage;
local Time = plr.leaderstats.Time;
Lives.Value = 25
Stage.Value = 0
Time.Value = 0
end
end)

1 comment
I tried this and it didn't work.