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
4 years ago
Edited 4 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 ?

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)
0
You would have to redo the :SetAsync() so that way it sets the progress as that current value VVoretex 146 — 4y
0
You would have to redo the :SetAsync() so that way it sets the progress as that current valueVortexGamingPlayerYT 99Of19 -10 — 4y

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
4 years ago

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)

Answer this question