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

How can I Lock my Server?

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?

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.

2 comments

0

Also make sure to make the connection a variable so you can unserverlock it

0

So like 'slock=false' and stuff like that?

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.