WorldRoot
WorldRoot : Instance
Properties
Methods
Raycast
The Raycast
method performs a ray-tracing operation from a given origin in a specific direction within the game world. It returns detailed information about the first object hit, if any, along the ray's path. This method is essential for physics interactions, line-of-sight calculations, and gameplay mechanics that rely on precise spatial queries.
Parameters
Vector3
InOrigin
Vector3
InDirection
RaycastParams
InRaycastParams
Return
RaycastResult
Code Samples
GetPartBoundsInBox
GetPartBoundsInBox computes the parts intersecting or within a specified box area, centered at a given point and with defined size. This method is particularly useful for detecting objects in a specified region, implementing area-of-effect mechanics, and determining spatial relationships between items within a predefined boundary.
Parameters
CFrame
InCenter
Vector3
InSize
OverlapParams
InOverlapParams
Return
array
Code Samples
Events
Last updated