PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

DataModel

Show deprecated

DataModel

Show deprecated

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.

Properties

int64

CreatorId

[ReadOnly] [NotReplicated]

Describes the ID of the user or group that owns the Articles/Place|place

CreatorType

CreatorType

[ReadOnly] [NotReplicated]

Describes the Enum/CreatorType of the Articles/Place|place, whether the place is owned by a user or a group

int64

GameId

[ReadOnly] [NotReplicated]

Describes the ID of the Articles/Multi Place Games|game the Articles/Place|place running on the server belongs to

Genre

Genre

[ReadOnly] [NotReplicated]

Not functional. Historically described the Enum/Genre of the Articles/Place|place as set on the Roblox website

string

JobId

[ReadOnly] [NotReplicated]

A unique identifier for the game server instance running. Defaults to an empty string in Roblox Studio

int64

PlaceId

[ReadOnly] [NotReplicated]

Describes the ID of the Articles/Place|place running on the server

int

PlaceVersion

[ReadOnly] [NotReplicated]

Describes the version of the Articles/Place|place the server is running on

string

PrivateServerId

[ReadOnly] [NotReplicated]

Describes the private server ID of the server, if the server is a Articles/Creating a VIP Server on Roblox|VIP server or a TeleportService/ReserveServer|reserved server

int64

PrivateServerOwnerId

[ReadOnly] [NotReplicated]

Describes the Player/UserId|UserId of the Player that owns the Articles/Creating a VIP Server on Roblox|VIP server, if the server is a VIP server

Workspace

Workspace

[ReadOnly] [NotReplicated]

A reference to the Workspace service

Functions

void

BindToClose ( Function function )

Binds a function to be called before the game shuts down. The game will wait for all functions bound to complete before shutting down

double

GetJobIntervalPeakFraction ( string jobname , double greaterThan )

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

double

GetJobTimePeakFraction ( string jobname , double greaterThan )

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

Array

GetJobsExtendedStats ( )

Returns a table containing extended statistics on the jobs performed by the task scheduler

Array

GetJobsInfo ( )

Returns a table containing basic information about the jobs performed by the task scheduler

Objects

GetObjects ( Content url )

Returns an array of Instance|Instances associated with the given Articles/Content|content URL

bool

IsLoaded ( )

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

void

Load ( Content url )

Loads a Roblox Place File from a URL.

void

SetPlaceId ( int64 placeId )

Sets the DataModel/PlaceId of the current game instance to the given placeId

void

SetUniverseId ( int64 universeId )

Sets the DataModel/GameId of the current game instance to the given universeId

void

Shutdown ( )

Shuts down the current game instance

Events

RBXScriptSignal

GraphicsQualityChangeRequest ( bool betterQuality )

Fires when the user prompts and increase or decrease in graphics quality using the hotkeys

RBXScriptSignal

Loaded ( )

Fires on the client when the game finishes loading for the first time