My script is where it does not allow anybody but, me to go inside game. But script wont work, please fix.
game.Players.PlayerAdded:connect(function(plr)
if plr.Name != "Bowser_Films"
plr.kick("Your can not enter inside.")
My script is where it does not allow anybody but, me to go inside game. But script wont work, please fix.
game.Players.PlayerAdded:connect(function(plr)
if plr.Name != "Bowser_Films"
plr.kick("Your can not enter inside.")
Put this in a normal script, not a Local Script
game.Players.PlayerAdded:Connect(function(plr)
if plr.Name ~= "Bowser_Films" then
plr:Kick("You're banned")
end
end)
The problem was that you did " != ", in lua to do not equal to, you must do " ~= ", also you forgot 2 ends, one for the function and one for the if statement .
the lua symbol for not equals is ~= so an example of this is:
local t = true
local f= false
print(t == f)
print(t ~= f)
Also I don't want to say this again:
CLOSE YOUR IF STATEMENTS AND FUNCTIONS WITH A end
This discussion is preserved as it was. New answers, comments, and votes are closed.