Answered by
5 years ago Edited 5 years ago
If you are trying to kick a player when they join a server (Like a ban list) then you're doing it wrong. You are looking through the LocalPlayer for the player named in the value owner. Meaning your not looking at all the players in the server.
You would use a PlayerAdded event running when a player joins then you would check if the players' name = the value you want. Here are my edits below.
01 | local owner = **LOCATION OF OWNER** |
02 | local Players = game:GetService( 'Players' ) |
05 | Players.PlayerAdded:Connect( function (plr) |
06 | if plr.Name = = owner then |
Make sure this is in a ServerScript and not a LocalScript
If this helped you please mark as answered :D