Learn
Engine Class
WorldRoot
Not Creatable

Summary
Methods
ArePartsTouchingOthers(partList: Instances,overlapIgnored: number):boolean
Blockcast(cframe: CFrame,size: Vector3,direction: Vector3,params: RaycastParams):RaycastResult?
BulkMoveTo(partList: Instances,cframeList: {any},eventMode: Enum.BulkMoveMode):()
FindPartOnRay(ray: Ray,ignoreDescendantsInstance: Instance,terrainCellsAreCubes: boolean,ignoreWater: boolean):Tuple
Deprecated
findPartOnRay(ray: Ray,ignoreDescendantsInstance: Instance,terrainCellsAreCubes: boolean,ignoreWater: boolean):Tuple
Deprecated
FindPartOnRayWithIgnoreList(ray: Ray,ignoreDescendantsTable: Instances,terrainCellsAreCubes: boolean,ignoreWater: boolean):Tuple
Deprecated
FindPartOnRayWithWhitelist(ray: Ray,whitelistDescendantsTable: Instances,ignoreWater: boolean):Tuple
Deprecated
FindPartsInRegion3(region: Region3,ignoreDescendantsInstance: Instance,maxParts: number):{BasePart}
Deprecated
findPartsInRegion3(region: Region3,ignoreDescendantsInstance: Instance,maxParts: number):{BasePart}
Deprecated
FindPartsInRegion3WithIgnoreList(region: Region3,ignoreDescendantsTable: Instances,maxParts: number):{BasePart}
Deprecated
FindPartsInRegion3WithWhiteList(region: Region3,whitelistDescendantsTable: Instances,maxParts: number):{BasePart}
Deprecated
GetPartBoundsInBox(cframe: CFrame,size: Vector3,overlapParams: OverlapParams):{BasePart}
GetPartBoundsInRadius(position: Vector3,radius: number,overlapParams: OverlapParams):{BasePart}
IKMoveTo(part: BasePart,target: CFrame,translateStiffness: number,rotateStiffness: number,collisionsMode: Enum.IKCollisionsMode):()
IsRegion3Empty(region: Region3,ignoreDescendentsInstance: Instance):boolean
Deprecated
IsRegion3EmptyWithIgnoreList(region: Region3,ignoreDescendentsTable: Instances):boolean
Deprecated
Raycast(origin: Vector3,direction: Vector3,raycastParams: RaycastParams):RaycastResult?
Spherecast(position: Vector3,radius: number,direction: Vector3,params: RaycastParams):RaycastResult?
StepPhysics(dt: number,parts: Instances):()
Inherited Members
Inherited by

API Reference
Methods
ArePartsTouchingOthers
Simulation Access
WorldRoot:ArePartsTouchingOthers(
partList:Instances, overlapIgnored:number
Parameters
partList:Instances
overlapIgnored:number
Default Value: 0.000199999995
Returns
Code Samples
Checking for Touching Parts
local part1 = Instance.new("Part")
part1.Name = "Part1"
part1.Anchored = true
part1.Transparency = 0.5
part1.Color = Color3.fromRGB(185, 100, 38)
part1.Size = Vector3.new(2, 2, 2)
part1.Position = Vector3.new(0, 4, 0)
part1.Parent = workspace
local part2 = Instance.new("Part")
part2.Name = "Part2"
part2.Anchored = true
part2.Transparency = 0.5
part2.Color = Color3.fromRGB(200, 10, 0)
part2.Size = Vector3.new(2, 2, 2)
part2.Position = Vector3.new(0, 5, 0)
part2.Parent = workspace
local partList = { part1 }
print(workspace:ArePartsTouchingOthers(partList, 0)) -- True
print(workspace:ArePartsTouchingOthers(partList, 0.999)) -- True
print(workspace:ArePartsTouchingOthers(partList, 1)) -- False

Blockcast
Write Parallel
Simulation Access
WorldRoot:Blockcast(
cframe:CFrame, size:Vector3, direction:Vector3, params:RaycastParams
Parameters
cframe:CFrame
size:Vector3
direction:Vector3
Default Value: "RaycastParams{IgnoreWater=false, BruteForceAllSlow=false, RespectCanCollide=false, CollisionGroup=Default, FilterDescendantsInstances={}}"
Code Samples
Blockcasting
local Workspace = game:GetService("Workspace")
local function castBlock()
-- The initial position and rotation of the cast block shape
local originCFrame = CFrame.new(Vector3.new(0, 50, 0))
-- The size of the cast block shape
local size = Vector3.new(6, 3, 9)
-- The direction the block is cast in
local direction = -Vector3.yAxis
-- The maximum distance of the cast
local distance = 50
-- Cast the block and create a visualization of it
local raycastResult = Workspace:Blockcast(originCFrame, size, direction * distance)
if raycastResult then
-- Print all properties of the RaycastResult if it exists
print(`Block intersected with: {raycastResult.Instance:GetFullName()}`)
print(`Intersection position: {raycastResult.Position}`)
print(`Distance between block's initial position and result: {raycastResult.Distance}`)
print(`The normal vector of the intersected face: {raycastResult.Normal}`)
print(`Material hit: {raycastResult.Material.Name}`)
else
print("Nothing was hit")
end
end
-- Continually cast a block every 2 seconds
while true do
castBlock()
task.wait(2)
end

BulkMoveTo
Simulation Access
WorldRoot:BulkMoveTo(
partList:Instances, cframeList:{any}, eventMode:Enum.BulkMoveMode
):()
Parameters
partList:Instances
cframeList:{any}
Default Value: "FireAllEvents"
Returns
()

FindPartOnRay
Deprecated

findPartOnRay
Deprecated

FindPartOnRayWithIgnoreList
Deprecated

FindPartOnRayWithWhitelist
Deprecated

FindPartsInRegion3
Deprecated

findPartsInRegion3
Deprecated

FindPartsInRegion3WithIgnoreList
Deprecated

FindPartsInRegion3WithWhiteList
Deprecated

GetPartBoundsInBox
Write Parallel
Simulation Access
WorldRoot:GetPartBoundsInBox(
cframe:CFrame, size:Vector3, overlapParams:OverlapParams
Parameters
cframe:CFrame
size:Vector3
overlapParams:OverlapParams
Default Value: "OverlapParams{MaxParts=0, Tolerance=0, BruteForceAllSlow=false, RespectCanCollide=false, CollisionGroup=Default, FilterDescendantsInstances={}}"
Returns

GetPartBoundsInRadius
Write Parallel
Simulation Access
WorldRoot:GetPartBoundsInRadius(
position:Vector3, radius:number, overlapParams:OverlapParams
Parameters
position:Vector3
radius:number
overlapParams:OverlapParams
Default Value: "OverlapParams{MaxParts=0, Tolerance=0, BruteForceAllSlow=false, RespectCanCollide=false, CollisionGroup=Default, FilterDescendantsInstances={}}"
Returns

GetPartsInPart
Write Parallel
Simulation Access
WorldRoot:GetPartsInPart(
part:BasePart, overlapParams:OverlapParams
Parameters
overlapParams:OverlapParams
Default Value: "OverlapParams{MaxParts=0, Tolerance=0, BruteForceAllSlow=false, RespectCanCollide=false, CollisionGroup=Default, FilterDescendantsInstances={}}"
Returns

IKMoveTo
Plugin Security
Simulation Access
WorldRoot:IKMoveTo(
part:BasePart, target:CFrame, translateStiffness:number, rotateStiffness:number, collisionsMode:Enum.IKCollisionsMode
):()
Parameters
target:CFrame
translateStiffness:number
Default Value: 0.5
rotateStiffness:number
Default Value: 0.5
collisionsMode:Enum.IKCollisionsMode
Default Value: "OtherMechanismsAnchored"
Returns
()

IsRegion3Empty
Deprecated

IsRegion3EmptyWithIgnoreList
Deprecated

Raycast
Write Parallel
Simulation Access
WorldRoot:Raycast(
origin:Vector3, direction:Vector3, raycastParams:RaycastParams
Parameters
origin:Vector3
direction:Vector3
raycastParams:RaycastParams
Default Value: "RaycastParams{IgnoreWater=false, BruteForceAllSlow=false, RespectCanCollide=false, CollisionGroup=Default, FilterDescendantsInstances={}}"
Code Samples
Raycasting
local Workspace = game:GetService("Workspace")
local function castRay()
-- The origin point of the ray
local originPosition = Vector3.new(0, 50, 0)
-- The direction the ray is cast in
local direction = -Vector3.yAxis
-- The maximum distance of the ray
local distance = 50
-- Cast the ray and create a visualization of it
local raycastResult = Workspace:Raycast(originPosition, direction * distance)
if raycastResult then
-- Print all properties of the RaycastResult if it exists
print(`Ray intersected with: {raycastResult.Instance:GetFullName()}`)
print(`Intersection position: {raycastResult.Position}`)
print(`Distance between ray origin and result: {raycastResult.Distance}`)
print(`The normal vector of the intersected face: {raycastResult.Normal}`)
print(`Material hit: {raycastResult.Material.Name}`)
else
print("Nothing was hit")
end
end
-- Continually cast a ray every 2 seconds
while true do
castRay()
task.wait(2)
end

Shapecast
Simulation Access
WorldRoot:Shapecast(
part:BasePart, direction:Vector3, params:RaycastParams
Parameters
direction:Vector3
Default Value: "RaycastParams{IgnoreWater=false, BruteForceAllSlow=false, RespectCanCollide=false, CollisionGroup=Default, FilterDescendantsInstances={}}"

Spherecast
Write Parallel
Simulation Access
WorldRoot:Spherecast(
position:Vector3, radius:number, direction:Vector3, params:RaycastParams
Parameters
position:Vector3
radius:number
direction:Vector3
Default Value: "RaycastParams{IgnoreWater=false, BruteForceAllSlow=false, RespectCanCollide=false, CollisionGroup=Default, FilterDescendantsInstances={}}"
Code Samples
Spherecasting
local Workspace = game:GetService("Workspace")
local function castSphere()
-- The initial position of the cast spherical shape
local originPosition = Vector3.new(0, 50, 0)
-- The radius of the cast spherical shape in studs
local radius = 10
-- The direction the sphere is cast in
local direction = -Vector3.yAxis
-- The maximum distance of the cast
local distance = 50
-- Cast the sphere and create a visualization of it
local raycastResult = Workspace:Spherecast(originPosition, radius, direction * distance)
if raycastResult then
-- Print all properties of the RaycastResult if it exists
print(`Sphere intersected with: {raycastResult.Instance:GetFullName()}`)
print(`Intersection position: {raycastResult.Position}`)
print(`Distance between sphere's initial position and result: {raycastResult.Distance}`)
print(`The normal vector of the intersected face: {raycastResult.Normal}`)
print(`Material hit: {raycastResult.Material.Name}`)
else
print("Nothing was hit")
end
end
-- Continually cast a sphere every 2 seconds
while true do
castSphere()
task.wait(2)
end

StepPhysics
Plugin Security
WorldRoot:StepPhysics(
dt:number, parts:Instances
):()
Parameters
parts:Instances
Default Value: "{}"
Returns
()
Code Samples
StepPhysics
local RunService = game:GetService("RunService")
-- Optional array of parts to simulate; otherwise all parts will be simulated
local partsToSimulate = {
workspace.Part,
}
local function simulateParts(duration)
local time = 0.0
local stepJob
stepJob = RunService.RenderStepped:Connect(function(dt)
if time + dt > duration then
dt = duration - time
end
workspace:StepPhysics(dt, partsToSimulate)
time = time + dt
if time >= duration then
stepJob:Disconnect()
end
end)
end
-- Simulate workspace parts for 5 seconds, stepping the parts once per frame
simulateParts(5.0)

©2026 Roblox Corporation. Roblox, the Roblox logo and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.