Hi, i have a code but it throws it even if there is a line to check if it exists or not, what should i do?
local ownerPlayer = game.Players[singleModel.Parent.Parent:GetAttribute("Owner")]
if not ownerPlayer then game.Players:GetPlayerFromCharacter(seat.Occupant.Parent):Kick() end
Error:
invalid argument #2 (string expected, got nil)