My script is where it does not allow anybody but, me to go inside game. But script wont work, please fix.
1 | game.Players.PlayerAdded:connect( function (plr) |
2 | if plr.Name ! = "Bowser_Films" |
3 | plr.kick( "Your can not enter inside." ) |
Put this in a normal script, not a Local Script
1 | game.Players.PlayerAdded:Connect( function (plr) |
2 | if plr.Name ~ = "Bowser_Films" then |
3 | plr:Kick( "You're banned" ) |
4 | end |
5 | 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:
1 | local t = true |
2 | local f = false |
3 | print (t = = f) |
4 | print (t ~ = f) |
Also I don't want to say this again:
CLOSE YOUR IF STATEMENTS AND FUNCTIONS WITH A end