local Owner = game.Players.ImKittenOuttaMyMind if --How would I detect for the variable "Owner" to be in the game? end
Accessing a child that doesn't exist will throw an error.
We can use FindFirstChild
to solve this problem, since instead of throwing an error, it just returns nil
if the child is not present.
if game.Players:FindFirstChild("ImKittenOuttaMyMind") then -- nil is falsey, so if they are not present, this is fault -- all other objects are truey, so if they are present, -- this will occur: -- At this instant, ImKittenOuttaMyMind is a child of Players end