What does "game" in scripting significates?

Can someone please explain me what does “game” is for? I see it everywhere and it doesnt let me understand completely coding, i see it when you search an object in the workspace for example, or calling a service, or in a function, so i cant clearly define what “game” works for. For Example:
help 2

So if you can explain to me the completely definition, i will be so much grateful to you! :smile:

2 Likes

Here’s an API reference for the DataModel (game).

It states that: “The DataModel (commonly known as game after the global variable used to access it) is the root of Roblox’s parent-child hierarchy. Its direct children are services (such as the Workspace and Lighting ) that act as the fundamental components of a Roblox game.”

Basically everything you see in the Explorer are the children of game. Other services like RunService, TweenService, etc. are hidden.

2 Likes

the code

game

is the code that takes everything inside your game

It’s basically the top level parent of every instance in your game.
All the services are parented to it.

4 Likes

game is practically the invisible parent of all the services. (Lighting, Workspace, ReplicatedStorage, etc)