Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

2 answers

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.

2 comments

0

what?

0

i don't even know why this has an upvote

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)

5 comments

1

You can by doing: DataStoreName:GetAsync(player's.UserId) that's only if the key you set is the player's UserID

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.

0

Actually I found a source GlobalDataStore:RemoveAsync(key)

0

oh cool

This discussion is preserved as it was. New answers, comments, and votes are closed.