Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by
Komas19 34
5 years ago
Edited 5 years ago

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 ?

1local plr = game.Players.LocalPlayer
2local stats = plr.leaderstats
3script.Parent.MouseButton1Click:Connect(function()
4    stats.Points.Value = 0
5    stats.Prestige.Value = 0
6    stats.SuperPrestige.Value = 0
7    plr:LoadCharacter()
8end)
0
You would have to redo the :SetAsync() so that way it sets the progress as that current value VVoretex 146 — 5y
0
You would have to redo the :SetAsync() so that way it sets the progress as that current valueVortexGamingPlayerYT 99Of19 -10 — 5y

2 answers

Log in to vote
1
Answered by
ImTrev 344 Moderation Voter
4 years ago

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.

0
thx it work now Komas19 34 — 4y
Ad
Log in to vote
0
Answered by
99Of19 -10
5 years ago

Do this

01Local leaderstats = toolbox.Value = LoadPosition
02 
03if CharacterAdded = nil
04then Local leaderstats = game.Player.Leaderstats:WaitForChild
05if WaitForChild then
06FindFirstChild
07else
08print nil
09end
10Local BodilyFunctions = players.nil.nilValue = nil
11end
12end
13elseif
14local players is == nil
15then
16print("you guessed it")
17nilValue == nil
18end)

Answer this question