This site is no longer kept up to date. It has been superseded by the Roblox API Reference. Please update your bookmarks.
The DataModel class represents the root of the game hierarchy and the game itself. It contains all the game services and is a service provider because of this.
Returns | YieldFunction | History | |
---|---|---|---|
int | CreatePlace ( string placeName, int templatePlaceID ) | (+0.131, −0.153) | |
string | HttpGetAsync ( string url, HttpRequestType httpRequestType = Default, bool doNotAllowDiabolicalMode = false ) | ||
string | HttpPostAsync ( string url, string data, string contentType = */*, HttpRequestType httpRequestType = Default, bool doNotAllowDiabolicalMode = false ) | ||
bool | SaveToRoblox ( ) | (−0.310) | |
bool | SavePlace ( SaveFilter saveFilter = SaveAll ) | (+0.118) |
Event | History | |
---|---|---|
GraphicsQualityChangeRequest ( bool betterQuality ) | ||
Loaded ( ) | (+0.80) | |
SavePlaceFinished ( bool succeeded, string errorString ) | (+0.115, −0.118) | |
ScreenshotReady ( string path ) | (+0.287) | |
AllowedGearTypeChanged ( ) | ||
ItemChanged ( Instance object, Property descriptor ) |
Enum | History | |
---|---|---|
CreatorType | ||
GearGenreSetting | ||
GearType | ||
Genre | ||
HttpRequestType | (+0.298) | |
SaveFilter | (+0.113) |
All instances of ROBLOX games contain a singleton DataModel object which does not replicate and gives access to all the game services. The DataModel object can be accessed by scripts with the game
variable or with the Game
variable. These two variables are part of the global environment. The DataModel object provides many members related to the game itself. Those are particularly useful to get information about the game; examples of such members are the PlaceId and CreatorId properties.
Tags: readonly
This is the identifier of the user who owns the place. In offline games, this property has the value 0.
Tags: readonly
This indicates whether the place belongs to a user or to a group. Group places are not used anymore and this property is not very useful anymore, although group places still exist. They are now difficult to find and cannot be used.
Tags: readonly
This indicates whether gear that can be used in the game is restricted to gear that match the game's genre or not.
Version History:(−0.273)
Tags: RobloxScriptSecurity
This indicates whether the game is a personal server.
Tags: readonly
This is an identifier unique to the current game server. It can be used to identify the game server externally, for example when servers are communicating with a web server using HttpService. Example: 74829c09-ef44-483b-bdda-138bbd704f4b
.
Tags: readonly
This is the identifier of the place to which the game server belongs. It is 0 in offline games.
Version History:(+0.120)
Tags: readonly
This is the version of the current place. It corresponds to the version number given in the version history configuration page of the place, and is incremented of 1 each time the game is updated. It can be used to compare the recency of servers that need to communicate with a web server using HttpService.
Version History:(−0.49)
Deprecated: This member is deprecated.
Tags: RobloxScriptSecurity, hidden
Version History:(+0.181)
Deprecated: This member is deprecated.
Tags: hidden, readonly
Version History:(+0.210)
Deprecated: This member is deprecated.
Tags: hidden, readonly
Version History:(+0.68)
Deprecated: This member is deprecated.
Tags: readonly
Version History:(+0.122, −0.128)
Tags: RobloxSecurity
Version History:(+0.91, −0.310)
Tags: LocalUserSecurity
Version History:(−0.217)
Tags: LocalUserSecurity
Tags: PluginSecurity
Tags: PluginSecurity
Tags: PluginSecurity
Version History:(−0.331)
Tags: RobloxScriptSecurity
Version History:(−0.331)
Tags: RobloxScriptSecurity
Version History:(+0.170)
Tags: RobloxScriptSecurity
Version History:(−0.310)
Tags: RobloxScriptSecurity
Version History:(+0.115, −0.118)
Tags: RobloxPlaceSecurity
Version History:(−0.311)
Tags: PluginSecurity
Version History:(+0.236, −0.238)
Tags: PluginSecurity
Version History:(−0.311)
Tags: PluginSecurity
Version History:(−0.310)
Tags: LocalUserSecurity
Version History:(−0.311)
Tags: PluginSecurity
Version History:(−0.273)
Tags: LocalUserSecurity
Version History:(+0.173, −0.311)
Tags: PluginSecurity
Version History:(+0.181, −0.310)
Tags: LocalUserSecurity
Version History:(+0.210, −0.310)
Tags: LocalUserSecurity
Tags: LocalUserSecurity
Deprecated: This member is deprecated.
Version History:(−0.311)
Deprecated: This member is deprecated.
Tags: PluginSecurity
Version History:(−0.311)
Deprecated: This member is deprecated.
Tags: PluginSecurity
Version History:(−0.215)
Deprecated: This member is deprecated.
Tags: LocalUserSecurity
Tags: RobloxScriptSecurity
Tags: RobloxScriptSecurity
Version History:(+0.118)
Deprecated: This member is deprecated.
Version History:(+0.80)
Version History:(+0.115, −0.118)
Tags: RobloxPlaceSecurity
Deprecated: This member is deprecated.