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

Having trouble with a script which kicks people from the game when they join?

while true do
wait(1)
function onEnter(player)
wait(1)
player:Remove()
end
game.Players.PlayerAdded:connect(onEnter)
end

1 answer

✓ Accepted answer

Try this...

game.Players.PlayerAdded:connect(function(player)
	wait(1)
	player:Kick()
end)

Also, you don't need the while true do or the end after the game.Players part. Remove() has also been deprecated so you can't use it anymore.

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