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

Is it possible to remove a players leaderstats while not in the game?

Asked by 2 years ago
Edited 2 years ago

I'm trying to remove an exploiters leaderstats for my game, but he isn't rejoining the game and I don't know how to get rid of the leaderstats while he's offline. Help?

2 answers

Log in to vote
1
Answered by 2 years ago

When answering, if your answer does not fully solve the question, it should be written as a comment to the question instead of as an answer.

Could you set a script that removes his leader stats as soon as he joins, Using his user Id.

I don't know if you can remove if he is not in the game, It added is data to the game from the roblox severs when he joins. To remove it you have to access the roblox servers but only staff can do that, and it would be burred in the sever so the roblox stuff might not be able to get it out.

0
what? JesseSong 3916 — 2y
0
i don't even know why this has an upvote JesseSong 3916 — 2y
Ad
Log in to vote
0
Answered by
BiIinear 104
2 years ago

I don't think there's a way to request an offline player's data.

Alternatively, you can set up a script that listens for when a player joined. Check if that player's UserId matches the exploiters UserId you wanna ban, and if it matches, clear their data.

local ExploiterId = 1 -- bad guy's id

game:GetService("Players").PlayerAdded:Connect(function(player)

    if player.UserId == ExploiterId then

        -- clear bad guy's data
    end
end)
1
You can by doing: DataStoreName:GetAsync(player's.UserId) that's only if the key you set is the player's UserID MarkedTomato 810 — 2y
0
@MarkedTomato that would most-likely work, but I don't think there's a way to remove a leaderstats if the players not in the game. JesseSong 3916 — 2y
0
Actually I found a source GlobalDataStore:RemoveAsync(key) JesseSong 3916 — 2y
0
oh cool BiIinear 104 — 2y

Answer this question