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

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

Asked by
DevWork 80
10 years ago
1while true do
2wait(1)
3function onEnter(player)
4wait(1)
5player:Remove()
6end
7game.Players.PlayerAdded:connect(onEnter)
8end

Locked by TheMyrco

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?

1 answer

Log in to vote
0
Answered by
Nifer2 174
10 years ago

Try this...

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

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.

Ad