I need to know how to make a script that does that but certain people can lay and not get kicked?
Use the Kick
method.
1 | local PlayersWhichCanPlay = { masterhalo 55 = true , |
2 | jobro 13 = true } |
3 |
4 | game.Players.PlayerAdded:connect( function (Player) |
5 | if not PlayersWhichCanPlay [ Player.Name ] then |
6 | wait( 3 ) |
7 | Player:Kick() |
8 | end |
9 | end ) |
That won't work. (Correct me with proof if I'm wrong)
1 | local people = { "trogyssy" , "masterhalo55" } |
2 | Game.Players.PlayerAdded:connect( function (p) |
3 | local kick = true |
4 | for i = 1 , #people do |
5 | if p.Name = = people [ i ] then kick = false end |
6 | if kick = true then p:Kick() |
7 | end |
8 | end ) |