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

Is there a way to make a Script that Bans users by using UserID?

Sorry for the unusual question and this is not a request . I looked through the Wiki and couldn't find anything relevant to what I was thinking about. So I was wondering If it is possible to create and script and ban someone using UserID?

2 answers

✓ Accepted answer

Probably yeah, I know that Kohls Admin Epix Edit shows everyone the players id and age, so I'm thinking if you tracked when the player joins the game if his userid is a certain one then make sure he cannot join.

1 comment

0

Don't worry I found it using Object browser but if any of you guys want know this to Here.

This is script that Bans users by UserName or UserId. I recently didn't know how to do this so I am posting the Script below so if any wants to know how to do it they can find it out.

Banned = {46678737,6678737,"ROBLOX" , "Builderman",} --This is the Table where you enter the person's **UserName**  or  **UserId** to Ban them!

game.Players.PlayerAdded:connect(function(player)--This function activate the script every time someone enters the game
for i,Player in pairs (Banned) do --This check the table 
	if player.userId == Player  or player.Name == Player then --This Check the person **username** or **userId** who entered the game is the same as the one in the table.
		player:Kick()--If the Players name or UserId is the same as the one in the table then it kicks the player of the game.
		end
	end 
end)

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