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

How can I Lock my Server?

Asked by 10 years ago

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

Log in to vote
0
Answered by 10 years ago

For kohls admin:

:serverlock

0
Rly... CardboardRocks 215 — 10y
0
:P Roboy5857 20 — 10y
Ad
Log in to vote
0
Answered by 10 years ago

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.

0
Also make sure to make the connection a variable so you can unserverlock it wazap 100 — 10y
0
So like 'slock=false' and stuff like that? TheeDeathCaster 2368 — 10y
Log in to vote
0
Answered by 10 years ago
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)
Log in to vote
0
Answered by
IcyEvil 260 Moderation Voter
10 years ago

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 :)

Answer this question