Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

What is game's parent?

I was going to enter

game.Players

but hit enter on

game.Parent

What is game's parent and how do you use it in context?

2 answers

✓ Accepted answer

Try this in your command bar in Studio:

print(game.Parent)

If you did it correctly, it will print nil, which means there is no parent of game and there is nothing you can do to manipulate game's parent as it is non-existent.

game itself is a global variable used to reference DataModel, the genesis of ROBLOX's hierarchical structure. All instances and services of your game are all descendants of DataModel. It's pretty much the first ancestor, and has not parent itself.

Your script would indeed output nil because game has no Parent.

This discussion is preserved as it was. New answers, comments, and votes are closed.