roblox
The roblox namespace and the game global expose Conduit’s read-only-DataModel-plus-writable-property Instance API, mirroring Roblox’s game/Instance surface over the external Luau VM.
roblox namespace
Section titled “roblox namespace”roblox.GetInstances
Section titled “roblox.GetInstances”roblox.GetInstances() -> {Instance}
Returns every Instance currently reachable in the DataModel tree, capped at 100000 nodes.
for _, inst in roblox.GetInstances() do print(inst:GetFullName())endroblox.GetNilInstances
Section titled “roblox.GetNilInstances”roblox.GetNilInstances() -> {Instance}
Returns Instances found via a GC scan whose Parent is nil, i.e. objects that exist but are detached from the DataModel tree.
local orphans = roblox.GetNilInstances()print(#orphans)roblox.FindFirst
Section titled “roblox.FindFirst”roblox.FindFirst(className: string) -> Instance?
Finds the first Instance of the given class name via a GC walk, so it works even for instances not reachable from game’s tree.
local cam = roblox.FindFirst("Camera")Instance properties
Section titled “Instance properties”Instance.Name
Section titled “Instance.Name”Instance.Name -> string
The instance’s Name, read from the engine via indexing.
print(workspace.Name)Instance.ClassName
Section titled “Instance.ClassName”Instance.ClassName -> string
The instance’s class name.
print(part.ClassName)Instance.Parent
Section titled “Instance.Parent”Instance.Parent -> Instance?
The instance’s parent, or nil at the DataModel root.
local p = part.ParentInstance.Address
Section titled “Instance.Address”Instance.Address -> number
The raw userspace pointer backing the instance, as a number.
local addr = part.AddressTree navigation
Section titled “Tree navigation”Instance:GetChildren
Section titled “Instance:GetChildren”Instance:GetChildren() -> {Instance}
Returns a fresh array of the instance’s direct children.
for _, child in ipairs(workspace:GetChildren()) do print(child.Name) endInstance:FindFirstChild
Section titled “Instance:FindFirstChild”Instance:FindFirstChild(name: string, recursive: boolean?) -> Instance?
Returns the first direct child (or, if recursive is true, first descendant) matching name, or nil.
local hrp = character:FindFirstChild("HumanoidRootPart")Instance:FindFirstChildOfClass
Section titled “Instance:FindFirstChildOfClass”Instance:FindFirstChildOfClass(className: string) -> Instance?
Returns the first direct child whose ClassName matches; workspace:FindFirstChildOfClass(“Camera”) is routed through a cached singleton lookup instead of a child walk.
local humanoid = character:FindFirstChildOfClass("Humanoid")Instance:GetDescendants
Section titled “Instance:GetDescendants”Instance:GetDescendants(cap: number?) -> {Instance}
Returns every descendant in pre-order, capped at cap nodes (default 200000, 0 means unlimited); the cap argument is a bridge extension not present on real Roblox Instances.
local all = workspace:GetDescendants()Instance:GetFullName
Section titled “Instance:GetFullName”Instance:GetFullName() -> string
Returns the dot-separated path from the DataModel down to this instance.
print(part:GetFullName())Instance:IsAncestorOf
Section titled “Instance:IsAncestorOf”Instance:IsAncestorOf(other: Instance) -> boolean
Returns true if this instance is an ancestor of other.
if workspace:IsAncestorOf(part) then print("in workspace") endInstance:IsDescendantOf
Section titled “Instance:IsDescendantOf”Instance:IsDescendantOf(ancestor: Instance) -> boolean
Returns true if ancestor is an ancestor of this instance; implemented as the reverse of IsAncestorOf.
if part:IsDescendantOf(workspace) then print("in workspace") endInstance:WaitForChild
Section titled “Instance:WaitForChild”Instance:WaitForChild(name: string, timeout: number?) -> Instance?
Polls for a direct child named name every 30ms until found, until timeout elapses (default 5s, clamped to at most 30s), or until the engine closes; returns nil on timeout instead of hanging forever like live Roblox.
local hrp = character:WaitForChild("HumanoidRootPart", 10)Instance:IsInvalidInstance
Section titled “Instance:IsInvalidInstance”Instance:IsInvalidInstance() -> boolean
Returns true if the underlying engine object is no longer valid (destroyed or unreadable).
if part:IsInvalidInstance() then return endInstance:IsA
Section titled “Instance:IsA”Instance:IsA(className: string) -> boolean
Returns true if the instance’s class matches or inherits from className.
if part:IsA("BasePart") then print(part.Size) endInstance:FindFirstChildWhichIsA
Section titled “Instance:FindFirstChildWhichIsA”Instance:FindFirstChildWhichIsA(className: string) -> Instance?
Returns the first direct child whose class matches or inherits from className, or nil.
local part = model:FindFirstChildWhichIsA("BasePart")Instance:FindFirstAncestor
Section titled “Instance:FindFirstAncestor”Instance:FindFirstAncestor(name: string) -> Instance?
Walks up to 256 parents looking for one named name, or returns nil.
local model = part:FindFirstAncestor("MyModel")Instance:FindFirstAncestorOfClass
Section titled “Instance:FindFirstAncestorOfClass”Instance:FindFirstAncestorOfClass(className: string) -> Instance?
Walks up to 256 parents looking for an exact ClassName match, or returns nil.
local ws = part:FindFirstAncestorOfClass("Workspace")Instance:FindFirstAncestorWhichIsA
Section titled “Instance:FindFirstAncestorWhichIsA”Instance:FindFirstAncestorWhichIsA(className: string) -> Instance?
Walks up to 256 parents looking for one whose class matches or inherits from className, or returns nil.
local model = part:FindFirstAncestorWhichIsA("Model")Services & players
Section titled “Services & players”Instance:GetService
Section titled “Instance:GetService”Instance:GetService(className: string) -> Instance?
Searches the receiver’s direct children for one whose ClassName matches; called as game:GetService(name) it behaves like the real service lookup, but unlike Roblox it never creates a missing service, it just returns nil.
local players = game:GetService("Players")Instance:FindService
Section titled “Instance:FindService”Instance:FindService(className: string) -> Instance?
Identical implementation to GetService in this bridge (both are non-creating finds); kept as a separate name for source compatibility.
local rs = game:FindService("ReplicatedStorage")Instance:GetPlayers
Section titled “Instance:GetPlayers”Instance:GetPlayers() -> {Instance}
Returns the direct children that are Player instances; normally called on the Players service.
for _, plr in ipairs(game:GetService("Players"):GetPlayers()) do print(plr.Name) endInstance:GetPlayerByUserId
Section titled “Instance:GetPlayerByUserId”Instance:GetPlayerByUserId(userId: number) -> Instance?
Returns the child Player whose UserId matches, or nil; normally called on the Players service.
local plr = players:GetPlayerByUserId(123456)Instance:GetPlayerFromCharacter
Section titled “Instance:GetPlayerFromCharacter”Instance:GetPlayerFromCharacter(character: Instance) -> Instance?
Returns the child Player whose Name matches the given character model’s Name, or nil; normally called on the Players service.
local plr = players:GetPlayerFromCharacter(workspace.SomeCharacter)Attributes & properties
Section titled “Attributes & properties”Instance:GetAttribute
Section titled “Instance:GetAttribute”Instance:GetAttribute(name: string) -> (number | boolean | string | Vector3 | Vector2 | Color3)?
Returns the value of attribute name, or nil if the attribute doesn’t exist or its type isn’t one of the supported types.
local hp = npc:GetAttribute("MaxHP")Instance:GetAttributes
Section titled “Instance:GetAttributes”Instance:GetAttributes() -> {[string]: (number | boolean | string | Vector3 | Vector2 | Color3)}
Returns a table of every attribute whose type is supported; attributes of unsupported types are silently skipped.
for name, value in pairs(npc:GetAttributes()) do print(name, value) endInstance:SetAttribute
Section titled “Instance:SetAttribute”Instance:SetAttribute(name: string, value: number | boolean | Vector3 | Vector2 | Color3) -> ()
Writes value into an attribute that already exists; errors if the attribute isn’t present (new attributes can’t be created from outside) or if value’s type doesn’t match the attribute’s existing type.
npc:SetAttribute("MaxHP", 150)Instance:GetProperties
Section titled “Instance:GetProperties”Instance:GetProperties() -> {string}
Returns the names of the instance’s readable properties (not their values); many properties use virtual getters that can’t be read generically.
for _, prop in ipairs(part:GetProperties()) do print(prop) endInstance:GetPlayingAnimationTracks
Section titled “Instance:GetPlayingAnimationTracks”Instance:GetPlayingAnimationTracks() -> {Instance}
Returns the AnimationTrack instances currently active on this instance’s Animator (or on self if self is already an Animator).
for _, track in ipairs(humanoid:GetPlayingAnimationTracks()) do print(track.Name) endGeometry & projection
Section titled “Geometry & projection”Instance:GetPivot
Section titled “Instance:GetPivot”Instance:GetPivot() -> CFrame
Returns the instance’s CFrame if it’s a BasePart, or the center of its descendants’ bounding box (identity rotation) otherwise; errors if a Model has no BaseParts.
local cf = model:GetPivot()Instance:GetBoundingBox
Section titled “Instance:GetBoundingBox”Instance:GetBoundingBox() -> (CFrame, Vector3)
Returns an axis-aligned CFrame at the center of, and the size of, the world-space bounding box over every BasePart descendant (Terrain excluded); errors if none are found.
local cf, size = model:GetBoundingBox()Instance:GetExtentsSize
Section titled “Instance:GetExtentsSize”Instance:GetExtentsSize() -> Vector3
Returns just the size component of GetBoundingBox; errors if no BaseParts are found under the instance.
local size = model:GetExtentsSize()Instance:Raycast
Section titled “Instance:Raycast”Instance:Raycast(origin: Vector3, direction: Vector3, ignoreList: {Instance}?) -> RaycastResult?
Depth-first walks Workspace (same underlying call as physics.Raycast) and returns the closest BasePart hit, or nil on miss, rate limit, or when raycasting is disabled; blocking, so unsafe to call from a per-frame paint or update callback.
local hit = workspace:Raycast(Vector3.new(0,50,0), Vector3.new(0,-100,0), {character})Instance:WorldToScreenPoint
Section titled “Instance:WorldToScreenPoint”Instance:WorldToScreenPoint(worldPos: Vector3) -> (Vector3, boolean)
Projects worldPos through the active Camera, returning a Vector3 of screen X, Y and depth, plus whether the point is within the viewport; errors if there is no active Camera.
local screen, onScreen = workspace.CurrentCamera:WorldToScreenPoint(part.Position)Instance:WorldToViewportPoint
Section titled “Instance:WorldToViewportPoint”Instance:WorldToViewportPoint(worldPos: Vector3) -> (Vector3, boolean)
Alias of WorldToScreenPoint; identical implementation.
local screen, onScreen = workspace.CurrentCamera:WorldToViewportPoint(part.Position)Instance:GetMouseLocation
Section titled “Instance:GetMouseLocation”Instance:GetMouseLocation() -> Vector2
Returns the current mouse cursor position; callable on any Instance since it ignores self.
local pos = game:GetMouseLocation()