Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

My Reset stats script won't work perfectly and i can't reload the character how do i fix this ?

I did a reset stats button to my simulator , it correctly remove all from the leaderstats but when the Points value update it bring back the recent value and aslo it won't reload the character How do i fix this ?

local plr = game.Players.LocalPlayer
local stats = plr.leaderstats
script.Parent.MouseButton1Click:Connect(function()
	stats.Points.Value = 0
	stats.Prestige.Value = 0
	stats.SuperPrestige.Value = 0
	plr:LoadCharacter()
end)

2 comments

0

You would have to redo the :SetAsync() so that way it sets the progress as that current value

0

You would have to redo the :SetAsync() so that way it sets the progress as that current valueVortexGamingPlayerYT

2 answers

✓ Accepted answer

The reason your stats are changing back is because you're changing them Locally. You would have to change the stats on the server with a RemoteEvent.

1 comment

0

thx it work now

Do this

Local leaderstats = toolbox.Value = LoadPosition

if CharacterAdded = nil
then Local leaderstats = game.Player.Leaderstats:WaitForChild
if WaitForChild then
FindFirstChild
else
print nil
end
Local BodilyFunctions = players.nil.nilValue = nil
end
end
elseif
local players is == nil
then
print("you guessed it")
nilValue == nil
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.