Skip to content
Roblox API Reference

WorldRoot

Base class for handling physics simulation and 3D spatial queries.
  • Not creatable
Memory category
BaseParts
Own members
46
Inherited members
114
Subclasses
2
Siblings
5

Properties46

Inherited fromObject2

Property categoryData

Inherited fromInstance21

Property categoryBehavior

Property categoryData

Property categoryPermissions

Inherited fromPVInstance2

Property categoryPivot

  • Editor-only property that displays and edits the pivot's CFrame relative to the instance, moving only the pivot and leaving the instance in place.
    • Not replicated
    • Not scriptable

Property categoryTransform

  • Editor-only property that reads and sets the world CFrame of the PVInstance's pivot, moving the entire instance when changed from the Studio Properties window.
    • Not replicated
    • Not scriptable
Inherited fromModel14

Property categoryAppearance

Property categoryBehavior

Property categoryData

Property categoryPivot

Defined byWorldRoot7

Property categoryAirProperties

  • WorldRoot.Wind: number
    • Hidden
    • Roblox engine security
    • Simulation access
  • WorldRoot.WindDirection: Vector3
    • Hidden
    • Roblox engine security
    • Simulation access

Property categoryBehavior

  • WorldRoot.AutoSimulate: boolean
    • Hidden
    • Roblox engine security
  • WorldRoot.CollisionGroupData: string
    • Hidden
    • Not scriptable
    • Roblox engine security
  • WorldRoot.GravityDirection: Vector3
    • Hidden
    • Roblox engine security
    • Simulation access
  • WorldRoot.SimulationRate: number
    • Hidden
    • Roblox engine security

Property categoryData

  • WorldRoot.PhysicsStepTime: number
    • Hidden
    • Read only
    • Roblox script security

Methods103

Inherited fromObject3
  • Get an event that fires when a given property of the object changes.
    Parameters
    ParameterDescription
    property: string
    The property to connect to.
    Returns
    TypeDescription
    RBXScriptSignal
    A signal that fires whenever the property changes.
  • Object:IsA(className: string): boolean
    Returns true if an object's class matches or inherits from a given class.
    • Custom Lua state
    • Thread safe
    Parameters
    ParameterDescription
    className: string
    The class against which the Object's class will be checked. Case-sensitive.
    Returns
    TypeDescription
    boolean
    Describes whether the Object's class matched or is a subclass of the given class.
  • Object:isA(className: string): boolean
    Deprecated: This deprecated function is a variant of Object:IsA() which should be used instead.
    • Deprecated
    • Custom Lua state
    Parameters
    Parameter
    className: string
    Returns
    Type
    boolean

    Use IsA instead.

Inherited fromInstance39
Inherited fromPVInstance2
Inherited fromModel21
Defined byWorldRoot38
  • WorldRoot:ArePartsTouchingOthers(partList: { Instance },overlapIgnored: number? = 0.000199999995,): boolean
    Returns true if any of the given BasePart are touching any other parts.
    • Simulation access
    Parameters
    ParameterDescription
    partList: { Instance }
    A list of parts checks to see if any parts in the list are touching any parts not in the list.
    overlapIgnored: number? = 0.000199999995
    The part overlap threshold in studs that is ignored before parts are considered to be touching.
    Returns
    TypeDescription
    boolean
    True if and only if any of the parts in partList are touching any other parts (parts not in the partList). False if no parts are passed.
  • WorldRoot:Blockcast(cframe: CFrame,size: Vector3,direction: Vector3,params: RaycastParams? = RaycastParams{IgnoreWater=false, BruteForceAllSlow=false, RespectCanCollide=false, CollisionGroup=Default, FilterDescendantsInstances={}},): RaycastResult?
    Casts a block shape in a given direction and returns a RaycastResult if the shape hits a BasePart or Terrain cell.
    • Thread safe
    • Simulation access
    Parameters
    ParameterDescription
    cframe: CFrame
    The initial position and rotation of the cast block shape.
    size: Vector3
    The size of the cast block shape in studs. The maximum size is 512 studs.
    direction: Vector3
    Direction of the shapecast, with the magnitude representing the maximum distance the shape can travel. The maximum distance is 1024 studs.
    params: RaycastParams? = RaycastParams{IgnoreWater=false, BruteForceAllSlow=false, RespectCanCollide=false, CollisionGroup=Default, FilterDescendantsInstances={}}
    An object used to specify hit eligibility in the shapecast operation. If not provided, default values are used where all parts are considered and Terrain water is not ignored.
    Returns
    TypeDescription
    RaycastResult?
    Contains the result of the shapecast operation, or nil if no eligible BasePart or Terrain cell was hit.
  • WorldRoot:BulkMoveTo(partList: { Instance },cframeList: { any },eventMode: Enum.BulkMoveMode? = Enum.BulkMoveMode.FireAllEvents,)
    Moves an array of BaseParts to an array of CFrames.
    • Simulation access
    Parameters
    ParameterDescription
    partList: { Instance }
    An array of BaseParts to be moved. Each entry is matched by index to the corresponding entry in cframeList.
    cframeList: { any }
    An array of CFrames that the parts will be moved to, matched by index to partList. Both arrays must be the same length.
    eventMode: Enum.BulkMoveMode? = Enum.BulkMoveMode.FireAllEvents
    An BulkMoveMode enum specifying which Changed events fire during the move. Default is FireAllEvents.
  • WorldRoot:CacheCurrentTerrain(id: string,center: Vector3,radius: number,): string
    • Roblox script security
    Parameters
    Parameter
    id: string
    center: Vector3
    radius: number
    Returns
    Type
    string
  • WorldRoot:ClearCachedTerrain(id: string): boolean
    • Roblox script security
    Parameters
    Parameter
    id: string
    Returns
    Type
    boolean
  • WorldRoot:CollisionGroupsAreCollidable(name1: string, name2: string): boolean
    Returns whether the two groups will collide in this world.
    • Capabilities: Physics
    • Simulation access
    Parameters
    Parameter
    name1: string
    name2: string
    Returns
    Type
    boolean
  • WorldRoot:CollisionGroupSetCollidable(name1: string,name2: string,collidable: boolean,)
    Sets the collision status between two groups in this world.
    • Capabilities: Physics
    • Simulation access
    Parameters
    Parameter
    name1: string
    name2: string
    collidable: boolean
  • WorldRoot:GetAwakeContactNormals(): { any }
    • Custom Lua state
    • Roblox script security
    • Thread safe
    Returns
    Type
    { any }
  • WorldRoot:GetAwakeContactParts(): { any }
    • Custom Lua state
    • Roblox script security
    • Thread safe
    Returns
    Type
    { any }
  • WorldRoot:GetAwakeContactPositions(): { any }
    • Custom Lua state
    • Roblox script security
    • Thread safe
    Returns
    Type
    { any }
  • WorldRoot:GetAwakeRootParts(): { Instance }
    • Custom Lua state
    • Roblox script security
    • Thread safe
    Returns
    Type
    { Instance }
  • WorldRoot:GetMaxCollisionGroups(): number
    Returns the maximum number of collision groups in this world.
    • Capabilities: Physics
    • Simulation access
    Returns
    Type
    number
  • WorldRoot:GetPartBoundsInBox(cframe: CFrame,size: Vector3,overlapParams: OverlapParams? = OverlapParams{MaxParts=0, Tolerance=0, BruteForceAllSlow=false, RespectCanCollide=false, CollisionGroup=Default, FilterDescendantsInstances={}},): { Instance }
    Returns an array of parts whose bounding boxes overlap a given box.
    • Custom Lua state
    • Thread safe
    • Simulation access
    Parameters
    ParameterDescription
    cframe: CFrame
    The location of the center of the given box volume to be queried.
    size: Vector3
    The size of the given box volume to be queried.
    overlapParams: OverlapParams? = OverlapParams{MaxParts=0, Tolerance=0, BruteForceAllSlow=false, RespectCanCollide=false, CollisionGroup=Default, FilterDescendantsInstances={}}
    Contains reusable portions of the spatial query parameters.
    Returns
    TypeDescription
    { Instance }
    An array of BaseParts which matched the spatial query.
  • WorldRoot:GetPartBoundsInRadius(position: Vector3,radius: number,overlapParams: OverlapParams? = OverlapParams{MaxParts=0, Tolerance=0, BruteForceAllSlow=false, RespectCanCollide=false, CollisionGroup=Default, FilterDescendantsInstances={}},): { Instance }
    Returns an array of parts whose bounding boxes overlap a given sphere.
    • Custom Lua state
    • Thread safe
    • Simulation access
    Parameters
    ParameterDescription
    position: Vector3
    The location of the center of the given sphere volume to be queried.
    radius: number
    The radius of the given sphere volume to be queried.
    overlapParams: OverlapParams? = OverlapParams{MaxParts=0, Tolerance=0, BruteForceAllSlow=false, RespectCanCollide=false, CollisionGroup=Default, FilterDescendantsInstances={}}
    Contains reusable portions of the spatial query parameters.
    Returns
    TypeDescription
    { Instance }
    An array of BaseParts which matched the spatial query.
  • WorldRoot:GetPartsInPart(part: BasePart,overlapParams: OverlapParams? = OverlapParams{MaxParts=0, Tolerance=0, BruteForceAllSlow=false, RespectCanCollide=false, CollisionGroup=Default, FilterDescendantsInstances={}},): { Instance }
    Returns an array of parts whose occupied space is shared with the given part.
    • Custom Lua state
    • Thread safe
    • Simulation access
    Parameters
    ParameterDescription
    part: BasePart
    The part whose volume is to be checked against other parts.
    overlapParams: OverlapParams? = OverlapParams{MaxParts=0, Tolerance=0, BruteForceAllSlow=false, RespectCanCollide=false, CollisionGroup=Default, FilterDescendantsInstances={}}
    Contains reusable portions of the spatial query parameters.
    Returns
    TypeDescription
    { Instance }
    An array of BaseParts which matched the spatial query.
  • WorldRoot:GetRegisteredCollisionGroups(): { any }
    Returns a table with info on all of this world's collision groups.
    • Capabilities: Physics
    • Simulation access
    Returns
    Type
    { any }
  • WorldRoot:IKMoveTo(part: BasePart,target: CFrame,translateStiffness: number? = 0.5,rotateStiffness: number? = 0.5,collisionsMode: Enum.IKCollisionsMode? = Enum.IKCollisionsMode.OtherMechanismsAnchored,)
    Moves the specified part to the specified location via inverse kinematics rather than moving it there directly, to ensure any joints, constraints, or collisions that part is participating in remain physically satisfied.
    • Plugin security
    • Simulation access
    Parameters
    ParameterDescription
    part: BasePart
    The part being moved.
    target: CFrame
    The location to move the specified part.
    translateStiffness: number? = 0.5
    A number between 0 and 1 specifying how aggressively to match the part's position to the position part of the target CFrame.
    rotateStiffness: number? = 0.5
    A number between 0 and 1 specifying how aggressively to match the part's rotation to the rotation part of the target CFrame.
    collisionsMode: Enum.IKCollisionsMode? = Enum.IKCollisionsMode.OtherMechanismsAnchored
    Allows you to specify what objects should be effected by the physical resolution.
  • WorldRoot:IsCollisionGroupRegistered(name: string): boolean
    Checks if a collision group is registered in this world.
    • Capabilities: Physics
    • Simulation access
    Parameters
    Parameter
    name: string
    Returns
    Type
    boolean
  • WorldRoot:Raycast(origin: Vector3,direction: Vector3,raycastParams: RaycastParams? = RaycastParams{IgnoreWater=false, BruteForceAllSlow=false, RespectCanCollide=false, CollisionGroup=Default, FilterDescendantsInstances={}},): RaycastResult?
    Casts a ray using an origin, direction, and optional RaycastParams, then returns a RaycastResult if an eligible object or terrain intersects the ray.
    • Thread safe
    • Simulation access
    Parameters
    ParameterDescription
    origin: Vector3
    The origin point of the ray.
    direction: Vector3
    The directional vector of the ray. Note that the length of this vector matters, as parts/terrain further away than its length will not be tested.
    raycastParams: RaycastParams? = RaycastParams{IgnoreWater=false, BruteForceAllSlow=false, RespectCanCollide=false, CollisionGroup=Default, FilterDescendantsInstances={}}
    An object used to specify hit eligibility in the raycast operation. If not provided, default values are used where all parts are considered and Terrain water is not ignored.
    Returns
    TypeDescription
    RaycastResult?
    Contains the results of a raycast operation, or nil if no eligible BasePart or Terrain cell was hit.
  • WorldRoot:RaycastCachedTerrain(id: string,origin: Vector3,direction: Vector3,ignoreWater: boolean,): RaycastResult?
    • Roblox script security
    Parameters
    Parameter
    id: string
    origin: Vector3
    direction: Vector3
    ignoreWater: boolean
    Returns
    Type
    RaycastResult?
  • WorldRoot:RegisterCollisionGroup(name: string)
    Registers a new collision group in this world with the given name.
    • Capabilities: Physics
    • Simulation access
    Parameters
    Parameter
    name: string
  • WorldRoot:RenameCollisionGroup(from: string, to: string)
    Renames specified collision group in this world.
    • Capabilities: Physics
    • Simulation access
    Parameters
    Parameter
    from: string
    to: string
  • WorldRoot:SetInsertPoint(point: Vector3)
    • Roblox script security
    Parameters
    Parameter
    point: Vector3
  • WorldRoot:Shapecast(part: BasePart,direction: Vector3,params: RaycastParams? = RaycastParams{IgnoreWater=false, BruteForceAllSlow=false, RespectCanCollide=false, CollisionGroup=Default, FilterDescendantsInstances={}},cframeOverride: CFrame? = nil,sizeOverride: Vector3? = nil,): RaycastResult?
    Casts the shape of a given BasePart in a direction and returns a RaycastResult if the shape hits a BasePart or Terrain cell.
    • Simulation access
    Parameters
    ParameterDescription
    part: BasePart
    The part whose shape is cast. The cast uses this part's geometry (block, ball, mesh, and so on) and size; excessively large parts may not be supported, and it cannot be a Terrain part.
    direction: Vector3
    Direction of the shapecast, with the magnitude representing the maximum distance the shape can travel. The maximum distance is 1024 studs.
    params: RaycastParams? = RaycastParams{IgnoreWater=false, BruteForceAllSlow=false, RespectCanCollide=false, CollisionGroup=Default, FilterDescendantsInstances={}}
    An object used to specify hit eligibility in the shapecast operation. If not provided, default values are used where all other parts are considered and Terrain water is not ignored. The part being cast is always excluded from the results.
    cframeOverride: CFrame? = nil
    sizeOverride: Vector3? = nil
    Returns
    TypeDescription
    RaycastResult?
    Contains the result of the shapecast operation, or nil if no eligible BasePart or Terrain cell was hit.
  • WorldRoot:Simulate(dt: number)
    • Roblox engine security
    Parameters
    Parameter
    dt: number
  • WorldRoot:Spherecast(position: Vector3,radius: number,direction: Vector3,params: RaycastParams? = RaycastParams{IgnoreWater=false, BruteForceAllSlow=false, RespectCanCollide=false, CollisionGroup=Default, FilterDescendantsInstances={}},): RaycastResult?
    Casts a spherical shape in a given direction and returns a RaycastResult if the shape hits a BasePart or Terrain cell.
    • Thread safe
    • Simulation access
    Parameters
    ParameterDescription
    position: Vector3
    The initial position of the cast spherical shape.
    radius: number
    The radius of the cast spherical shape in studs. The maximum radius is 256 studs.
    direction: Vector3
    Direction of the shapecast, with the magnitude representing the maximum distance the shape can travel. The maximum distance is 1024 studs.
    params: RaycastParams? = RaycastParams{IgnoreWater=false, BruteForceAllSlow=false, RespectCanCollide=false, CollisionGroup=Default, FilterDescendantsInstances={}}
    An object used to specify hit eligibility in the shapecast operation. If not provided, default values are used where all parts are considered and Terrain water is not ignored.
    Returns
    TypeDescription
    RaycastResult?
    Contains the result of the shapecast operation, or nil if no eligible BasePart or Terrain cell was hit.
  • WorldRoot:StepPhysics(dt: number, parts: { Instance }? = {})
    Advances the simulation for parts in the world forward based on a specified time increment and an optional set of BaseParts.
    • Plugin security
    Parameters
    ParameterDescription
    dt: number
    The amount of time that will be simulated. This argument must be a positive number. Larger values will increase the runtime of this function.
    parts: { Instance }? = {}
    Optional array of parts that will be simulated. This set must contain instances that are of type BasePart; any other types will be ignored.
  • WorldRoot:UnregisterCollisionGroup(name: string)
    Unregisters the collision group for the given name in this world.
    • Capabilities: Physics
    • Simulation access
    Parameters
    Parameter
    name: string
  • WorldRoot:FindPartOnRay(ray: Ray,ignoreDescendantsInstance: Instance? = nil,terrainCellsAreCubes: boolean? = false,ignoreWater: boolean? = false,): ...any
    Deprecated: This function has been deprecated. Use WorldRoot:Raycast() along with RaycastParams for new work.
    Returns the first BasePart or Terrain cell intersecting with the given Ray.
    • Deprecated
    Parameters
    ParameterDescription
    ray: Ray
    A Ray whose origin and direction define the raycast.
    ignoreDescendantsInstance: Instance? = nil
    An Instance whose descendants are ignored in the raycast.
    terrainCellsAreCubes: boolean? = false
    Whether Terrain cells are treated as full cubes when calculating intersection. Default is false.
    ignoreWater: boolean? = false
    Whether Terrain water cells are ignored by the ray. Default is false.
    Returns
    TypeDescription
    ...any
    The BasePart or Terrain cell hit, the Vector3 point of intersection, the Vector3 surface normal at the point of intersection, and the Material of the BasePart or terrain cell hit.

    Use Raycast instead.

  • WorldRoot:FindPartOnRayWithIgnoreList(ray: Ray,ignoreDescendantsTable: { Instance },terrainCellsAreCubes: boolean? = false,ignoreWater: boolean? = false,): ...any
    Deprecated: This function has been deprecated. Use WorldRoot:Raycast() along with RaycastParams for new work.
    Returns the first BasePart or Terrain cell intersecting with the given Ray that isn't in, nor is a descendant of an object in, the given ignore list.
    • Deprecated
    Parameters
    ParameterDescription
    ray: Ray
    A Ray whose origin and direction define the raycast.
    ignoreDescendantsTable: { Instance }
    An array of objects whose descendants are excluded from the raycast.
    terrainCellsAreCubes: boolean? = false
    Whether Terrain cells are treated as full cubes when calculating intersection. Default is false.
    ignoreWater: boolean? = false
    Whether Terrain water cells are ignored by the ray. Default is false.
    Returns
    TypeDescription
    ...any
    The BasePart or Terrain cell hit, the Vector3 point of intersection, the Vector3 surface normal at the point of intersection, and the Material of the BasePart or terrain cell hit.

    Use Raycast instead.

  • WorldRoot:FindPartOnRayWithWhitelist(ray: Ray,whitelistDescendantsTable: { Instance },ignoreWater: boolean? = false,): ...any
    Deprecated: This function has been deprecated. Use WorldRoot:Raycast() along with RaycastParams for new work.
    Returns the first BasePart or Terrain cell intersecting with the given Ray that is in, or is a descendant of an object in, the given inclusion list.
    • Deprecated
    Parameters
    ParameterDescription
    ray: Ray
    A Ray whose origin and direction define the raycast.
    whitelistDescendantsTable: { Instance }
    An array of objects whose descendants are the only candidates considered in the raycast.
    ignoreWater: boolean? = false
    Whether Terrain water cells are ignored by the ray. Default is false.
    Returns
    TypeDescription
    ...any
    The BasePart or Terrain cell hit, the Vector3 point of intersection, the Vector3 surface normal at the point of intersection, and the Material of the BasePart or terrain cell hit.

    Use Raycast instead.

  • WorldRoot:FindPartsInRegion3(region: Region3,ignoreDescendantsInstance: Instance? = nil,maxParts: number? = 20,): { Instance }
    Deprecated: This function has been deprecated. Use WorldRoot:GetPartBoundsInBox() along with OverlapParams for new work.
    Returns an array of BaseParts in the given Region3.
    • Deprecated
    Parameters
    ParameterDescription
    region: Region3
    The Region3 to be checked.
    ignoreDescendantsInstance: Instance? = nil
    An Instance to be ignored.
    maxParts: number? = 20
    The maximum amount of BaseParts to be returned.
    Returns
    TypeDescription
    { Instance }
    An array of BaseParts within the Region3.

    Use GetPartBoundsInBox instead.

  • WorldRoot:FindPartsInRegion3WithIgnoreList(region: Region3,ignoreDescendantsTable: { Instance },maxParts: number? = 20,): { Instance }
    Deprecated: This function has been deprecated. Use WorldRoot:GetPartBoundsInBox() along with OverlapParams for new work.
    Returns an array of BaseParts in the given Region3 that aren't in, or a descendant of an entry in, the given ignore list.
    • Deprecated
    Parameters
    ParameterDescription
    region: Region3
    The Region3 to be checked.
    ignoreDescendantsTable: { Instance }
    An array of objects to be ignored.
    maxParts: number? = 20
    The maximum number of BaseParts to be returned.
    Returns
    TypeDescription
    { Instance }
    An array of BaseParts found within the Region3.

    Use GetPartBoundsInBox instead.

  • WorldRoot:FindPartsInRegion3WithWhiteList(region: Region3,whitelistDescendantsTable: { Instance },maxParts: number? = 20,): { Instance }
    Deprecated: This function has been deprecated. Use WorldRoot:GetPartBoundsInBox() along with OverlapParams for new work.
    Returns an array of BaseParts in the given Region3 that are in, or descendant of an entry in, the given inclusion list.
    • Deprecated
    Parameters
    ParameterDescription
    region: Region3
    The Region3 to be checked.
    whitelistDescendantsTable: { Instance }
    An array of objects to check.
    maxParts: number? = 20
    The maximum number of BaseParts to be returned.
    Returns
    TypeDescription
    { Instance }
    An array of BaseParts within the Region3.

    Use GetPartBoundsInBox instead.

  • WorldRoot:IsRegion3Empty(region: Region3,ignoreDescendentsInstance: Instance? = nil,): boolean
    Deprecated: This function has been deprecated. Use WorldRoot:GetPartBoundsInBox() along with OverlapParams for new work.
    Returns a bool indicating whether there are no BaseParts within the given Region3.
    • Deprecated
    Parameters
    ParameterDescription
    region: Region3
    The Region3 to be checked.
    ignoreDescendentsInstance: Instance? = nil
    An Instance to be ignored.
    Returns
    TypeDescription
    boolean
    True if the Region3 is empty.

    Use GetPartBoundsInBox instead.

  • WorldRoot:IsRegion3EmptyWithIgnoreList(region: Region3,ignoreDescendentsTable: { Instance },): boolean
    Deprecated: This function has been deprecated. Use WorldRoot:GetPartBoundsInBox() along with OverlapParams for new work.
    Returns a boolean indicating whether there are no BaseParts within the given Region3, ignoring any BaseParts that are descendants of the objects within the given ignore list.
    • Deprecated
    Parameters
    ParameterDescription
    region: Region3
    The Region3 to be checked.
    ignoreDescendentsTable: { Instance }
    An array of objects to be ignored.
    Returns
    TypeDescription
    boolean
    True if the Region3 is empty.

    Use GetPartBoundsInBox instead.

  • WorldRoot:findPartOnRay(ray: Ray,ignoreDescendantsInstance: Instance? = nil,terrainCellsAreCubes: boolean? = false,ignoreWater: boolean? = false,): ...any
    Deprecated: This deprecated function is a variant of WorldRoot:FindPartOnRay() which should be used instead.
    • Deprecated
    Parameters
    Parameter
    ray: Ray
    ignoreDescendantsInstance: Instance? = nil
    terrainCellsAreCubes: boolean? = false
    ignoreWater: boolean? = false
    Returns
    Type
    ...any

    Use Raycast instead.

  • WorldRoot:findPartsInRegion3(region: Region3,ignoreDescendantsInstance: Instance? = nil,maxParts: number? = 20,): { Instance }
    Deprecated: This deprecated function is a variant of WorldRoot:FindPartsInRegion3() which should be used instead.
    • Deprecated
    Parameters
    Parameter
    region: Region3
    ignoreDescendantsInstance: Instance? = nil
    maxParts: number? = 20
    Returns
    Type
    { Instance }

    Use GetPartBoundsInBox instead.

Events11

Inherited fromObject1
Inherited fromInstance9
Defined byWorldRoot1
  • WorldRoot.CollisionGroupCollidableChanged: RBXScriptSignal<(collisionGroupIndex1: number,collisionGroupIndex2: number,)>
    • Hidden
    • Roblox engine security
    Parameters
    Parameter
    collisionGroupIndex1: number
    collisionGroupIndex2: number