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 ?
1 | local plr = game.Players.LocalPlayer |
2 | local stats = plr.leaderstats |
3 | script.Parent.MouseButton 1 Click:Connect( function () |
4 | stats.Points.Value = 0 |
5 | stats.Prestige.Value = 0 |
6 | stats.SuperPrestige.Value = 0 |
7 | plr:LoadCharacter() |
8 | end ) |
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.
Do this
01 | Local leaderstats = toolbox.Value = LoadPosition |
02 |
03 | if CharacterAdded = nil |
04 | then Local leaderstats = game.Player.Leaderstats:WaitForChild |
05 | if WaitForChild then |
06 | FindFirstChild |
07 | else |
08 | print nil |
09 | end |
10 | Local BodilyFunctions = players. nil .nilValue = nil |
11 | end |
12 | end |
13 | elseif |
14 | local players is = = nil |
15 | then |
16 | print ( "you guessed it" ) |
17 | nilValue = = nil |
18 | end ) |