We use cookies on this site to enhance your user experience

DataModel

DataModel

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 the services such as the Workspace and Lighting in a game that act as containers for everything else, and also some services that aren’t used for containing things and are hidden from the browser for this reason. Every object that currently “exists” in the game hierarchy will have the DataModel as its ultimate ancestor.


The DataModel’s own members are for looking at or altering properties of the currently running game.


Properties

Name Type Description
int64

The place creator’s Player/UserId.

CreatorType

The Enum/CreatorType of the current place.

int64

The id of the game the current place is a part of.

GearGenreSetting

The type of gear that are allowed to enter the DataModel through the Players/LocalPlayer StarterPack.

Genre

The game’s genre.

string

A unique identifier for the current game server. Defaults to the empty string in offline mode.

int64

The Asset Id of the current place.

int

The version of the game that the server is running on.

string

A string that could identify the current server as a VIP server.

int64

The UserId of the account who owns the VIP server.

Workspace

A reference to the Workspace.

This reference will never be nil.

Inherited from Instance , ServiceProvider

Archivable ClassName DataCost Name Parent RobloxLocked

Functions

Name Type Description
void

Schedules the given function to be called when the game is about to shut down.

double

Returns the job interval peak fraction of the specified task scheduler job.

double

Returns the job time peak fraction of the specified task scheduler job.

Array

Returns a table containing the jobs performed by the game, and one reference table.

Array

Returns a table containing the jobs performed by the game, and one reference table.

Objects

Returns an array of Instances based on the specified content url.

bool

Returns true if the Enum/GearType is allowed to enter the game through a client’s StarterPack.

bool

Returns true if the game has finished loading for the first time.

void

Loads a Roblox Place File from a URL.

void

Sets the DataModel/PlaceId of the current game to the specified placeId.

void

Sets the DataModel/GameId of the current game to the specified universeId

void

Closes the current Roblox Instance.

Inherited from Instance , ServiceProvider

ClearAllChildren Clone Destroy FindFirstAncestor FindFirstAncestorOfClass FindFirstAncestorWhichIsA FindFirstChild FindFirstChildOfClass FindFirstChildWhichIsA GetChildren GetDebugId GetDescendants GetFullName GetPropertyChangedSignal IsA IsAncestorOf IsDescendantOf WaitForChild FindService GetService

Events

Name Type Description

Fired when the user wants to increase/decrease the graphics quality.

Fires when the game is loaded for the first time.

Inherited from Instance , ServiceProvider

AncestryChanged Changed ChildAdded ChildRemoved DescendantAdded DescendantRemoving Close CloseLate ServiceAdded ServiceRemoving