i want to reset player's stats when player died. Stats not saved data will be lost and stats saved data will not be reset. I can create a script that sets the value to 0 for each stats type when the player dies, but I have many types of stats, is there a way to solve this problem faster?
COMMUNITY QUESTION
how to reset player's stats when they died ?
1 answer
game.Players.PlayerAdded:connect(function(plr)
plr.CharacterAdded:connect(function(char)
char.Humanoid.Died:connect(function()
plr.leaderstats.STAT.Value = 0
end
end)
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
yes there is.
perhaps you can use a loop
Can you show me your script?