DataModel
Inherits ServiceProvider
DataModel represents the top-level container in the instance hierarchy. It inherits from ServiceProvider and manages all game services like Workspace. Typically accessed via the global `game` variable in Lua.
Examples
local workspace = game:GetService("Workspace")
local part = Instance.new("Part")
part.Parent = workspace
Methods
Gets a service by name, creating it if it doesn't exist
Parameters:
serviceNamestring
local workspace = game:GetService("Workspace")
Finds a service by name without creating it
Parameters:
serviceNamestring
local workspace = game:FindService("Workspace")
if workspace then
print("Workspace exists")
end