Hello,
In my game, I accidentally gave a random user 1,000,000,000,000 kills (the leaderstat). They left the game afterwards, and I'm not sure how I can set their leaderstat to 0, without wiping everyone else's progress.
Thank you, KreativleV2
Hello,
In my game, I accidentally gave a random user 1,000,000,000,000 kills (the leaderstat). They left the game afterwards, and I'm not sure how I can set their leaderstat to 0, without wiping everyone else's progress.
Thank you, KreativleV2
Just use a Script that sets that exact player's stats to zero!
This is a Script that can go in Workspace or ServerScriptService.
local RUYGST = "" --Stands for Random User You Gave Stats To >:)
--RUYGST should be the player's name in exact capitals as it is spelled!
game.Players.PlayerAdded:Connect(function(player)
if player.Name == RUYGST then
player.leaderstats.kills.Value = 0
end
end)
Issue is this will take place the next time they join the game, not when they're not playing. So try to get them to join and their leaderstats will reset.
Use GlobalDataStore and the key to their DataStore and :SetAsync the value to 0 (if you’re using normal DataStores)
Otherwise, not sure.
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
GDS:SetAsync(User_key, 0). if you lack their unique identifier, I'm afraid your issue cannot be resolved—unless you're using an OrderedDataStore.
You can wipe their data via GDS:RemoveAsync(User_key).