So, I have created a script that kicks people according to their name, however, the script is not working and is allowing the person to play.
Here is Script
function BanCheck()
game:GetService('Players').PlayerAdded:Connect(function(player)
local plrNAME = player.Name
if plrNAME == "Rinextel"
then plr:Kick("You are banned from this game")
end)
end
BanCheck()

8 comments
Btw, they can still change their userid if the script is client sided.
No, the user id of the player is a locked property and it can't be accessed by the client or server. But either way you want your script to be server sided.
I know, but what I am saying is that.: If an exploiter, joined they may change their userid/name using an exploit. but it would not replicate to the server so the kick script would have to be client sided for the exploit to work.
^ As I said, the player's user id and the name is a locked property, if you tried changing it would simply error. Also even if that was possible the client wouldn't replicate to the server.
That's literally what I just said. Plus, exploits can bypass locked properties as they have access to a full lua environment.
No.
Plus if the script is server sided it wouldn't have effect :xdd:
Thats what i said 3 times.