What I mean by 'Lock my Server' is a ServerLock script, for instance like the ServerLock commands in Kohl's and Lua's admin, I have tried making my own, but they kick me too, what could I be doing wrong?
COMMUNITY QUESTION
How can I Lock my Server?
4 answers
When you say something, the playeradded function goes into play.
Ex:
function playeradded(player)
player:kick()
end
game.Players.PlayerAdded:connect(playeradded)
Something like that, but you have put all of this (except line 4) into your chatted script.
For kohls admin:
:serverlock
2 comments
0
Rly...
0
:P
game.Players.PlayerAdded:connect(function(plr)
if plr.Name~="Person1" or plr.Name~="Person2" or plr.Name~="Player3" then
-- add more if you want but just put the players who you want to be allowed in the game name's here
plr:Kick()
end)
Edited version of Tempestatems script
game.Players.PlayerAdded:connect(function(plr)
if plr.Name~="Person1" or plr.Name~="Person2" or plr.Name~="Player3" then
-- add more if you want but just put the players who you want to be allowed in the game name's here
plr:Kick()
end
end)
he just didn't use Studio Otherwise he would of had it :)
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Also make sure to make the connection a variable so you can unserverlock it
So like 'slock=false' and stuff like that?