Missing Argument or nil (line 3) , take a look:
local owner = script.Parent.Parent.Owner.Value local player = game.Players.LocalPlayer while true do wait(0.1) if game.Players:FindFirstChild(owner) == owner then player:Kick() print("yay") else print("none") end end
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.
local owner = **LOCATION OF OWNER** local Players = game:GetService('Players') Players.PlayerAdded:Connect(function(plr) if plr.Name == owner then plr:Kick() print('Dead') else print('Yo safe') end end)
Make sure this is in a ServerScript and not a LocalScript
If this helped you please mark as answered :D