> For the complete documentation index, see [llms.txt](https://docs.overdare.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.overdare.com/development/api-reference/classes/worldroot.md).

# WorldRoot

WorldRoot : `Instance`

## Overview

A WorldRoot is a class used for detecting or simulating Objects in 3D space

## Properties

### AllowDebugDraw

`boolean`

This property specifies whether the debug drawing methods starting with Draw are active. The default is false in Shipping builds and true in other builds (Development, Debug).

Setting this to false causes subsequent Draw calls to be ignored, and any debug drawings already drawn are immediately removed.

#### Code Samples

## Methods

### Blockcast

Moves a box-shaped region defined by a given position (CFrame) and size (Extents) into a specified Direction, detects any objects along its path, and returns the result as a RaycastResult object. It works like Raycast, but can detect a broader region of Objects as it detects collision in a box shape instead of a ray shape.

#### Parameters

| `CFrame` InCFrame               | The coordinate frame representing a box’s initial position and rotation.                                                                                                                                                               |
| ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Vector3` InExtents             | A vector defining the size (width, length, height) of a box.                                                                                                                                                                           |
| `Vector3` InDirection           | A vector representing the box’s movement direction; its length (size) also determines the detectable distance.                                                                                                                         |
| `RaycastParams` InRaycastParams | A settings object that configures object detection conditions. Use RaycastParams to exclude specific parts or set a collision group. If not specified, the default settings apply, and all objects become potential detection targets. |

#### Return

| `RaycastResult` | A result object containing information about the first object the box collided with along its path. Returns nil if no collision occurs. |
| --------------- | --------------------------------------------------------------------------------------------------------------------------------------- |

#### Code Samples

### BlockcastSingleByChannel

Moves a box-shaped region defined by a given position (CFrame) and size (Extents) into a specified Direction, detects any objects along its path based on the specified collision channel (TraceChannel), and returns the result as a RaycastResult object. It works like Blockcast, but performs collision detection based on a collision channel.

#### Parameters

| `CFrame` InCFrame                          | The coordinate frame representing the box's initial position and rotation.                                                                                               |
| ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `Vector3` InExtents                        | A vector defining the size (width, length, height) of the box.                                                                                                           |
| `Vector3` InDirection                      | A vector representing the box's movement direction; its length (size) also determines the detectable distance.                                                           |
| `Enum.CollisionChannel` TraceChannel       | The collision channel used for collision detection. Only objects whose response to this channel is set to Block or Overlap become detection targets.                     |
| `CollisionQueryParams` InQueryParams       | An object that can configure detailed conditions for collision queries, including which objects to be detected or ignored. If not specified, the default settings apply. |
| `CollisionResponseParams` InResponseParams | An object specifying the response behavior for each collision channel. If not specified, the default response settings apply.                                            |

#### Return

| `RaycastResult` | A result object containing information about the first object the box collided with along its path. Returns nil if no collision occurs. |
| --------------- | --------------------------------------------------------------------------------------------------------------------------------------- |

#### Code Samples

### BlockcastSingleByChannelName

Moves a box-shaped region defined by a given position (CFrame) and size (Extents) into a specified Direction, detects any objects along its path based on the name of the specified collision channel (ChannelDisplayName), and returns the result as a RaycastResult object. It works like BlockcastSingleByChannel, but allows specifying the collision channel by name (string) instead of Enum.CollisionChannel. Internally, it converts the name to a collision channel and then calls BlockcastSingleByChannel; if no channel matching the given name is found, it does not perform collision detection.

#### Parameters

| `CFrame` InCFrame                          | The coordinate frame representing the box's initial position and rotation.                                                                                                                                        |
| ------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Vector3` InExtents                        | A vector defining the size (width, length, height) of the box.                                                                                                                                                    |
| `Vector3` InDirection                      | A vector representing the box's movement direction; its length (size) also determines the detectable distance.                                                                                                    |
| `string` ChannelDisplayName                | The name of the collision channel used for collision detection. The search prioritizes channel names registered in the collision profile; if no channel with the given name is found, detection is not performed. |
| `CollisionQueryParams` InQueryParams       | An object that can configure detailed conditions for collision queries, including which objects to be detected or ignored. If not specified, the default settings apply.                                          |
| `CollisionResponseParams` InResponseParams | An object specifying the response behavior for each collision channel. If not specified, the default response settings apply.                                                                                     |

#### Return

| `RaycastResult` | A result object containing information about the first object the box collided with along its path. Returns nil if no collision occurs or if no collision channel matching the given name is found. |
| --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

#### Code Samples

### BlockcastSingleByObject

Moves a box-shaped region defined by a given position (CFrame) and size (Extents) into a specified Direction, detects any objects along its path based on object query parameters, and returns the result as a RaycastResult object. It works like Blockcast, but performs collision detection based on object type.

#### Parameters

| `CFrame` InCFrame                           | The coordinate frame representing a box's initial position and rotation.                                                              |
| ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| `Vector3` InExtents                         | A vector defining the size (width, length, height) of a box.                                                                          |
| `Vector3` InDirection                       | A vector representing the box's movement direction; its length (size) also determines the detectable distance.                        |
| `CollisionQueryParams` InQueryParams        | An object that can configure detailed conditions for collision queries, including which objects to be detected or ignored.            |
| `CollisionObjectQueryParams` InObjectParams | An object specifying which object types should be detected for collisions. Allows setting specific object types as collision targets. |

#### Return

| `RaycastResult` | A result object containing information about the first object the box collided with along its path. Returns nil if no collision occurs. |
| --------------- | --------------------------------------------------------------------------------------------------------------------------------------- |

#### Code Samples

### BlockcastSingleByProfile

Moves a box-shaped region defined by a given position (CFrame) and size (Extents) into a specified Direction, detects any objects along its path based on the specified collision profile (ProfileName), and returns the result as a RaycastResult object. It works like Blockcast, but performs collision detection based on a collision profile.

#### Parameters

| `CFrame` InCFrame                    | The coordinate frame representing a box's initial position and rotation.                                                                                |
| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Vector3` InExtents                  | A vector defining the size (width, length, height) of a box.                                                                                            |
| `Vector3` InDirection                | A vector representing the box's movement direction; its length (size) also determines the detectable distance.                                          |
| `string` ProfileName                 | The name of the collision profile used for collision detection. The detection targets are determined by the collision response settings of the profile. |
| `CollisionQueryParams` InQueryParams | An object that can configure detailed conditions for collision queries, including which objects to be detected or ignored.                              |

#### Return

| `RaycastResult` | A result object containing information about the first object the box collided with along its path. Returns nil if no collision occurs. |
| --------------- | --------------------------------------------------------------------------------------------------------------------------------------- |

#### Code Samples

### Capsulecast

Moves a capsule-shaped region defined by a given position (CFrame), Radius, and Height into a specified Direction, detects any objects along its path, and returns the result as a RaycastResult object. Ideal for predicting character movement paths or collisions, as it detects collisions using capsule shape which resembles a character's form.

#### Parameters

| `CFrame` InCFrame               | The coordinate frame representing the initial position and rotation of a capsule.                                                                                                                                                      |
| ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `number` InRadius               | The radius of a capsule.                                                                                                                                                                                                               |
| `number` InHalfHeight           | The height of a capsule.                                                                                                                                                                                                               |
| `Vector3` InDirection           | A vector representing the capsule’s movement direction; its length (size) also determines the detectable distance.                                                                                                                     |
| `RaycastParams` InRaycastParams | A settings object that configures object detection conditions. Use RaycastParams to exclude specific parts or set a collision group. If not specified, the default settings apply, and all objects become potential detection targets. |

#### Return

| `RaycastResult` | A result object containing information about the first object the capsule collided with along its path. Returns nil if no collision occurs. |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |

#### Code Samples

### CapsulecastSingleByChannel

Moves a capsule-shaped region defined by a given position (CFrame), Radius, and Height into a specified Direction, detects any objects along its path based on the specified collision channel (TraceChannel), and returns the result as a RaycastResult object. It works like Capsulecast, but performs collision detection based on a collision channel.

#### Parameters

| `CFrame` InCFrame                          | The coordinate frame representing the initial position and rotation of the capsule.                                                                                      |
| ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `number` InRadius                          | The radius of the capsule.                                                                                                                                               |
| `number` InHalfHeight                      | The height of the capsule.                                                                                                                                               |
| `Vector3` InDirection                      | A vector representing the capsule's movement direction; its length (size) also determines the detectable distance.                                                       |
| `Enum.CollisionChannel` TraceChannel       | The collision channel used for collision detection. Only objects whose response to this channel is set to Block or Overlap become detection targets.                     |
| `CollisionQueryParams` InQueryParams       | An object that can configure detailed conditions for collision queries, including which objects to be detected or ignored. If not specified, the default settings apply. |
| `CollisionResponseParams` InResponseParams | An object specifying the response behavior for each collision channel. If not specified, the default response settings apply.                                            |

#### Return

| `RaycastResult` | A result object containing information about the first object the capsule collided with along its path. Returns nil if no collision occurs. |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |

#### Code Samples

### CapsulecastSingleByChannelName

Moves a capsule-shaped region defined by a given position (CFrame), Radius, and Height into a specified Direction, detects any objects along its path based on the name of the specified collision channel (ChannelDisplayName), and returns the result as a RaycastResult object. It works like CapsulecastSingleByChannel, but allows specifying the collision channel by name (string) instead of Enum.CollisionChannel. Internally, it converts the name to a collision channel and then calls CapsulecastSingleByChannel; if no channel matching the given name is found, it does not perform collision detection.

#### Parameters

| `CFrame` InCFrame                          | The coordinate frame representing the initial position and rotation of the capsule.                                                                                                                               |
| ------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `number` InRadius                          | The radius of the capsule.                                                                                                                                                                                        |
| `number` InHalfHeight                      | The height of the capsule.                                                                                                                                                                                        |
| `Vector3` InDirection                      | A vector representing the capsule's movement direction; its length (size) also determines the detectable distance.                                                                                                |
| `string` ChannelDisplayName                | The name of the collision channel used for collision detection. The search prioritizes channel names registered in the collision profile; if no channel with the given name is found, detection is not performed. |
| `CollisionQueryParams` InQueryParams       | An object that can configure detailed conditions for collision queries, including which objects to be detected or ignored. If not specified, the default settings apply.                                          |
| `CollisionResponseParams` InResponseParams | An object specifying the response behavior for each collision channel. If not specified, the default response settings apply.                                                                                     |

#### Return

| `RaycastResult` | A result object containing information about the first object the capsule collided with along its path. Returns nil if no collision occurs or if no collision channel matching the given name is found. |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

#### Code Samples

### CapsulecastSingleByObject

Moves a capsule-shaped region defined by a given position (CFrame), Radius, and Height into a specified Direction, detects any objects along its path based on object query parameters, and returns the result as a RaycastResult object. It works like Capsulecast, but performs collision detection based on object type.

#### Parameters

| `CFrame` InCFrame                           | The coordinate frame representing the initial position and rotation of a capsule.                                                     |
| ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| `number` InRadius                           | The radius of a capsule.                                                                                                              |
| `number` InHalfHeight                       | The height of a capsule.                                                                                                              |
| `Vector3` InDirection                       | A vector representing the capsule's movement direction; its length (size) also determines the detectable distance.                    |
| `CollisionQueryParams` InQueryParams        | An object that can configure detailed conditions for collision queries, including which objects to be detected or ignored.            |
| `CollisionObjectQueryParams` InObjectParams | An object specifying which object types should be detected for collisions. Allows setting specific object types as collision targets. |

#### Return

| `RaycastResult` | A result object containing information about the first object the capsule collided with along its path. Returns nil if no collision occurs. |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |

#### Code Samples

### CapsulecastSingleByProfile

Moves a capsule-shaped region defined by a given position (CFrame), Radius, and Height into a specified Direction, detects any objects along its path based on the specified collision profile (ProfileName), and returns the result as a RaycastResult object. It works like Capsulecast, but performs collision detection based on a collision profile.

#### Parameters

| `CFrame` InCFrame                    | The coordinate frame representing the initial position and rotation of a capsule.                                                                       |
| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `number` InRadius                    | The radius of a capsule.                                                                                                                                |
| `number` InHalfHeight                | The height of a capsule.                                                                                                                                |
| `Vector3` InDirection                | A vector representing the capsule's movement direction; its length (size) also determines the detectable distance.                                      |
| `string` ProfileName                 | The name of the collision profile used for collision detection. The detection targets are determined by the collision response settings of the profile. |
| `CollisionQueryParams` InQueryParams | An object that can configure detailed conditions for collision queries, including which objects to be detected or ignored.                              |

#### Return

| `RaycastResult` | A result object containing information about the first object the capsule collided with along its path. Returns nil if no collision occurs. |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |

#### Code Samples

### ClearDebugDraw

A method that immediately removes all debug drawings (lines, shapes, strings, etc.) drawn so far by methods starting with Draw.

It can be called even when AllowDebugDraw is false.

#### Parameters

#### Return

| `void` |   |
| ------ | - |

#### Code Samples

### DrawArrow

A method that draws an arrow-shaped debug shape pointing from a given starting point (InOrigin) toward a direction (InDirection). Mainly used for debugging purposes to visually check a direction or force vector.

#### Parameters

| `Vector3` InOrigin    | The position where the arrow starts.                                                                                     |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| `Vector3` InDirection | A vector representing the direction the arrow points; the length of this vector also determines the length of the arrow. |
| `Color3` InColor      | The color of the arrow.                                                                                                  |
| `number` InArrowSize  | The size of the arrowhead.                                                                                               |
| `number` InThickness  | The thickness of the arrow's shaft line.                                                                                 |
| `number` InLifeTime   | The duration (in seconds) that the arrow persists in the world.                                                          |

#### Return

| `void` |   |
| ------ | - |

#### Code Samples

### DrawBox

A method that draws a box-shaped wireframe debug shape defined by a given position and size.

#### Parameters

| `CFrame` InCFrame    | The coordinate frame representing the position and rotation of the box. |
| -------------------- | ----------------------------------------------------------------------- |
| `Vector3` InSize     | A vector representing the size (width, length, height) of the box.      |
| `Color3` InColor     | The color of the box.                                                   |
| `number` InThickness | The thickness of the box's outline.                                     |
| `number` InLifeTime  | The duration (in seconds) that the box persists in the world.           |

#### Return

| `void` |   |
| ------ | - |

#### Code Samples

### DrawCamera

A method that draws a frustum-shaped debug shape visualizing a camera's field of view (FOV) at a given position and direction.

#### Parameters

| `CFrame` InCFrame     | The coordinate frame representing the camera's position and direction.        |
| --------------------- | ----------------------------------------------------------------------------- |
| `number` InFOVDegrees | The camera's field of view, in degrees, limited to a value between 0 and 180. |
| `number` InScale      | The size multiplier of the camera frustum shape.                              |
| `Color3` InColor      | The color of the shape.                                                       |
| `number` InLifeTime   | The duration (in seconds) that the shape persists in the world.               |

#### Return

| `void` |   |
| ------ | - |

#### Code Samples

### DrawCapsule

A method that draws a capsule-shaped wireframe debug shape defined by a given position and size.

#### Parameters

| `CFrame` InCFrame     | The coordinate frame representing the position and rotation of the capsule.                      |
| --------------------- | ------------------------------------------------------------------------------------------------ |
| `number` InHalfHeight | The half-height of the capsule; if smaller than InRadius, it is corrected to the InRadius value. |
| `number` InRadius     | The radius of the capsule.                                                                       |
| `Color3` InColor      | The color of the capsule.                                                                        |
| `number` InThickness  | The thickness of the capsule's outline.                                                          |
| `number` InLifeTime   | The duration (in seconds) that the capsule persists in the world.                                |

#### Return

| `void` |   |
| ------ | - |

#### Code Samples

### DrawCircle

A method that draws a circle-shaped debug shape centered on a given position.

#### Parameters

| `CFrame` InCFrame    | The coordinate frame representing the circle's position and direction (the plane the circle lies on). |
| -------------------- | ----------------------------------------------------------------------------------------------------- |
| `number` InRadius    | The radius of the circle.                                                                             |
| `Color3` InColor     | The color of the circle.                                                                              |
| `number` InSegments  | The number of line segments making up the circle; a larger value draws a smoother circle.             |
| `number` InThickness | The thickness of the circle's outline.                                                                |
| `number` InLifeTime  | The duration (in seconds) that the circle persists in the world.                                      |
| `boolean` InDrawAxis | If set to true, also displays the circle's center coordinate axes.                                    |

#### Return

| `void` |   |
| ------ | - |

#### Code Samples

### DrawCircleArc

A method that draws a fan-shaped arc centered on a given center point.

#### Parameters

| `Vector3` InCenter           | The center position of the arc.                                                     |
| ---------------------------- | ----------------------------------------------------------------------------------- |
| `Vector3` InDirection        | A vector representing the reference direction the arc faces.                        |
| `number` InRadius            | The radius of the arc.                                                              |
| `number` InAngleWidthRadians | The total angular range of the arc, specified in radians.                           |
| `Color3` InColor             | The color of the arc.                                                               |
| `number` InSegments          | The number of line segments making up the arc; a larger value draws a smoother arc. |
| `number` InThickness         | The thickness of the arc.                                                           |
| `number` InLifeTime          | The duration (in seconds) that the arc persists in the world.                       |

#### Return

| `void` |   |
| ------ | - |

#### Code Samples

### DrawCone

A method that draws a cone-shaped debug shape extending from a given starting point (InOrigin) toward a direction (InDirection). Useful for visualizing a field of view or detection range.

#### Parameters

| `Vector3` InOrigin            | The position of the cone's apex.                                                     |
| ----------------------------- | ------------------------------------------------------------------------------------ |
| `Vector3` InDirection         | A vector representing the direction the cone extends toward.                         |
| `number` InLength             | The length of the cone.                                                              |
| `number` InAngleWidthRadians  | The horizontal half-angle of the cone, specified in radians.                         |
| `number` InAngleHeightRadians | The vertical half-angle of the cone, specified in radians.                           |
| `Color3` InColor              | The color of the cone.                                                               |
| `number` InNumSides           | The number of sides making up the cone's base; a larger value draws a smoother cone. |
| `number` InThickness          | The thickness of the cone's outline.                                                 |
| `number` InLifeTime           | The duration (in seconds) that the cone persists in the world.                       |

#### Return

| `void` |   |
| ------ | - |

#### Code Samples

### DrawCoordinateSystem

A method that draws a coordinate system debug shape representing the X, Y, and Z axes at a given position and rotation.

#### Parameters

| `CFrame` InCFrame    | The coordinate frame representing the position and rotation of the coordinate system. |
| -------------------- | ------------------------------------------------------------------------------------- |
| `number` InScale     | The length multiplier of the coordinate axes.                                         |
| `number` InThickness | The thickness of the coordinate axis lines.                                           |
| `number` InLifeTime  | The duration (in seconds) that the coordinate system persists in the world.           |

#### Return

| `void` |   |
| ------ | - |

#### Code Samples

### DrawCrosshairs

A method that draws a crosshair-shaped debug shape at a given position and rotation.

#### Parameters

| `CFrame` InCFrame   | The coordinate frame representing the position and rotation of the crosshairs. |
| ------------------- | ------------------------------------------------------------------------------ |
| `number` InScale    | The size multiplier of the crosshairs.                                         |
| `Color3` InColor    | The color of the crosshairs.                                                   |
| `number` InLifeTime | The duration (in seconds) that the crosshairs persist in the world.            |

#### Return

| `void` |   |
| ------ | - |

#### Code Samples

### DrawCylinder

A method that draws a cylinder-shaped debug shape connecting a given starting point (InStart) and ending point (InEnd).

#### Parameters

| `Vector3` InStart    | The starting position (center of the base) of the cylinder.                                                   |
| -------------------- | ------------------------------------------------------------------------------------------------------------- |
| `Vector3` InEnd      | The ending position (center of the top) of the cylinder.                                                      |
| `number` InRadius    | The radius of the cylinder.                                                                                   |
| `Color3` InColor     | The color of the cylinder.                                                                                    |
| `number` InSegments  | The number of line segments making up the cylinder's cross-section; a larger value draws a smoother cylinder. |
| `number` InThickness | The thickness of the cylinder's outline.                                                                      |
| `number` InLifeTime  | The duration (in seconds) that the cylinder persists in the world.                                            |

#### Return

| `void` |   |
| ------ | - |

#### Code Samples

### DrawDonut

A method that draws a donut (ring) shaped debug shape centered on a given position.

#### Parameters

| `CFrame` InCFrame      | The coordinate frame representing the donut's position and direction (the plane the donut lies on).       |
| ---------------------- | --------------------------------------------------------------------------------------------------------- |
| `number` InInnerRadius | The inner radius of the donut.                                                                            |
| `number` InOuterRadius | The outer radius of the donut; if smaller than InInnerRadius, it is corrected to the InInnerRadius value. |
| `Color3` InColor       | The color of the donut.                                                                                   |
| `number` InSegments    | The number of line segments making up the donut; a larger value draws a smoother donut.                   |
| `number` InThickness   | The thickness of the donut's outline.                                                                     |
| `number` InLifeTime    | The duration (in seconds) that the donut persists in the world.                                           |

#### Return

| `void` |   |
| ------ | - |

#### Code Samples

### DrawLine

A method that draws a straight line connecting a given starting point (InStart) and ending point (InEnd) on the screen. Mainly used for debugging purposes.

#### Parameters

| `Vector3` InStart    | The starting position of the line.                             |
| -------------------- | -------------------------------------------------------------- |
| `Vector3` InEnd      | The ending position of the line.                               |
| `Color3` InColor     | The color of the line.                                         |
| `number` InThickness | The thickness of the line.                                     |
| `number` InLifeTime  | The duration (in seconds) that the line persists in the world. |

#### Return

| `void` |   |
| ------ | - |

#### Code Samples

### DrawMesh

A method that draws a triangle mesh-shaped debug shape composed of given vertices (InVertices) and indices (InIndices).

#### Parameters

| `Array` InVertices  | An array of vertex positions making up the mesh.                                                                               |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| `Array` InIndices   | An array of indices that group the vertex array into sets of three to form triangles; the total count must be a multiple of 3. |
| `Color3` InColor    | The color of the mesh.                                                                                                         |
| `number` InLifeTime | The duration (in seconds) that the mesh persists in the world.                                                                 |

#### Return

| `void` |   |
| ------ | - |

#### Code Samples

### DrawPoint

A method that draws a point-shaped debug shape at a given position.

#### Parameters

| `Vector3` InPosition | The position of the point.                                      |
| -------------------- | --------------------------------------------------------------- |
| `Color3` InColor     | The color of the point.                                         |
| `number` InSize      | The size of the point.                                          |
| `number` InLifeTime  | The duration (in seconds) that the point persists in the world. |

#### Return

| `void` |   |
| ------ | - |

#### Code Samples

### DrawRay

This method displays a ray of a specified color on the screen based on a given origin and direction for visual representation.

This is mainly used for debugging and is helpful for visually identifying the direction and destination of a Raycast.

#### Parameters

| `Vector3` InOrigin    | The starting point from which the ray is cast.                                                                                          |
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| `Vector3` InDirection | This vector defines the direction of the ray. The length (magnitude) of this vector also determines how far the ray can detect Objects. |
| `Color3` InColor      | The color of the ray.                                                                                                                   |
| `number` InThickness  | The width of the ray.                                                                                                                   |
| `number` InLifeTime   | The duration (in seconds) that the ray persists in the world.                                                                           |

#### Return

| `void` |   |
| ------ | - |

#### Code Samples

```lua
local Workspace = game:GetService("Workspace")

local Origin = Vector3.new(0, 50, 0)
local Direction = Vector3.new(0, 0, -1000)
local Color = Color3.fromRGB(255, 0, 0)
local Thickness = 5
local LifeTime = 1.5

Workspace:DrawRay(Origin, Direction, Color, Thickness, LifeTime)
```

### DrawSolidBox

A method that draws a filled (solid) box-shaped debug shape defined by a given position and size.

#### Parameters

| `CFrame` InCFrame   | The coordinate frame representing the position and rotation of the box. |
| ------------------- | ----------------------------------------------------------------------- |
| `Vector3` InSize    | A vector representing the size (width, length, height) of the box.      |
| `Color3` InColor    | The color of the box.                                                   |
| `number` InLifeTime | The duration (in seconds) that the box persists in the world.           |

#### Return

| `void` |   |
| ------ | - |

#### Code Samples

### DrawSolidPlane

A method that draws a filled (solid) plane-shaped debug shape at a given position and direction.

#### Parameters

| `CFrame` InCFrame   | The coordinate frame representing the position and direction (normal direction) of the plane. |
| ------------------- | --------------------------------------------------------------------------------------------- |
| `number` InSize     | The size of the plane.                                                                        |
| `Color3` InColor    | The color of the plane.                                                                       |
| `number` InLifeTime | The duration (in seconds) that the plane persists in the world.                               |

#### Return

| `void` |   |
| ------ | - |

#### Code Samples

### DrawSphere

A method that draws a sphere-shaped wireframe debug shape defined by a given center point (InCenter) and radius (InRadius).

#### Parameters

| `Vector3` InCenter   | The center position of the sphere.                                                        |
| -------------------- | ----------------------------------------------------------------------------------------- |
| `number` InRadius    | The radius of the sphere.                                                                 |
| `Color3` InColor     | The color of the sphere.                                                                  |
| `number` InSegments  | The number of line segments making up the sphere; a larger value draws a smoother sphere. |
| `number` InThickness | The thickness of the sphere's outline.                                                    |
| `number` InLifeTime  | The duration (in seconds) that the sphere persists in the world.                          |

#### Return

| `void` |   |
| ------ | - |

#### Code Samples

### DrawSpline

A method that draws a smooth curve (Catmull-Rom spline) passing through given points (InPoints). At least 4 points must be specified.

#### Parameters

| `Array` InPoints             | An array of points the curve passes through; at least 4 points must be specified.            |
| ---------------------------- | -------------------------------------------------------------------------------------------- |
| `Color3` InColor             | The color of the curve.                                                                      |
| `number` InAlpha             | A value that adjusts the tension of the spline, limited to a value between 0 and 1.          |
| `number` InSamplesPerSegment | The number of samples used to represent each segment; a larger value draws a smoother curve. |
| `number` InThickness         | The thickness of the curve.                                                                  |
| `number` InLifeTime          | The duration (in seconds) that the curve persists in the world.                              |

#### Return

| `void` |   |
| ------ | - |

#### Code Samples

### DrawString

A method that displays a string on the screen at a given position.

#### Parameters

| `Vector3` InLocation   | The position where the string is displayed.                           |
| ---------------------- | --------------------------------------------------------------------- |
| `string` InText        | The string to display.                                                |
| `Color3` InColor       | The color of the string.                                              |
| `number` InDuration    | The duration (in seconds) that the string is displayed on the screen. |
| `boolean` InDrawShadow | If set to true, also displays a shadow behind the string.             |
| `number` InFontScale   | The font size multiplier of the string.                               |

#### Return

| `void` |   |
| ------ | - |

#### Code Samples

### GetPartBoundsInBox

Searches for and returns an array of parts that overlap with a box-shaped region defined by a given Center and Size. Use OverlapParams to fine-tune filtering conditions and detection scope.

#### Parameters

| `CFrame` InCenter               | The center coordinate of the region to be detected.                                                                                                                                                                                    |
| ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Vector3` InSize                | The width, height, and depth of the box-shaped detection region.                                                                                                                                                                       |
| `OverlapParams` InOverlapParams | A settings object that configures object detection conditions. Use OverlapParams to exclude specific parts or set a collision group. If not specified, the default settings apply, and all objects become potential detection targets. |

#### Return

| `Array` | An array of the objects detected within the box-shaped region. |
| ------- | -------------------------------------------------------------- |

#### Code Samples

```lua
local Center = Vector3.new(0, 50, 0)
local Size = Vector3.new(1000, 1000, 1000)
local Cframe = CFrame.new(Center)
local PartsInBox = workspace:GetPartBoundsInBox(Cframe, Size)

for _, obj in ipairs(PartsInBox) do
    print(obj.Name)
end
```

### GetPartBoundsInBoxByChannel

Finds parts overlapping a box-shaped region defined by a given Center and Size, filtered by the specified collision channel (TraceChannel), and returns them as an array. It works like GetPartBoundsInBox, but performs collision detection based on a collision channel.

#### Parameters

| `CFrame` InCenter                          | The center coordinate of the region to detect.                                                                                                                           |
| ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `Vector3` InSize                           | The width, length, and height of the box-shaped detection range.                                                                                                         |
| `Enum.CollisionChannel` TraceChannel       | The collision channel used for collision detection. Only objects whose response to this channel is set to Block or Overlap become detection targets.                     |
| `CollisionQueryParams` InQueryParams       | An object that can configure detailed conditions for collision queries, including which objects to be detected or ignored. If not specified, the default settings apply. |
| `CollisionResponseParams` InResponseParams | An object specifying the response behavior for each collision channel. If not specified, the default response settings apply.                                            |

#### Return

| `Array` | An array of objects detected within the box-shaped region. |
| ------- | ---------------------------------------------------------- |

#### Code Samples

### GetPartBoundsInBoxByChannelName

Finds parts overlapping a box-shaped region defined by a given Center and Size, filtered by the name of the specified collision channel (ChannelDisplayName), and returns them as an array. It works like GetPartBoundsInBoxByChannel, but allows specifying the collision channel by name (string) instead of Enum.CollisionChannel. Internally, it converts the name to a collision channel and then calls GetPartBoundsInBoxByChannel; if no channel matching the given name is found, it does not perform detection.

#### Parameters

| `CFrame` InCenter                          | The center coordinate of the region to detect.                                                                                                                                                                    |
| ------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Vector3` InSize                           | The width, length, and height of the box-shaped detection range.                                                                                                                                                  |
| `string` ChannelDisplayName                | The name of the collision channel used for collision detection. The search prioritizes channel names registered in the collision profile; if no channel with the given name is found, detection is not performed. |
| `CollisionQueryParams` InQueryParams       | An object that can configure detailed conditions for collision queries, including which objects to be detected or ignored. If not specified, the default settings apply.                                          |
| `CollisionResponseParams` InResponseParams | An object specifying the response behavior for each collision channel. If not specified, the default response settings apply.                                                                                     |

#### Return

| `Array` | An array of objects detected within the box-shaped region. Returns an empty array if no collision channel matching the given name is found. |
| ------- | ------------------------------------------------------------------------------------------------------------------------------------------- |

#### Code Samples

### GetPartBoundsInSphere

Searches for and returns an array of parts that overlap with a sphere-shaped region defined by a given Center and Radius. It is useful for proximity check or Area-of-Effect detection.

#### Parameters

| `CFrame` InCenter               | The center coordinate of the sphere-shaped region to be detected.                                                                                                                                                                      |
| ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `number` InRadius               | The radius of a sphere.                                                                                                                                                                                                                |
| `OverlapParams` InOverlapParams | A settings object that configures object detection conditions. Use OverlapParams to exclude specific parts or set a collision group. If not specified, the default settings apply, and all objects become potential detection targets. |

#### Return

| `Array` | An array of the objects detected within the sphere-shaped region. |
| ------- | ----------------------------------------------------------------- |

#### Code Samples

### GetPartBoundsInSphereByChannel

Finds parts overlapping a sphere-shaped region defined by a given Center and Radius, filtered by the specified collision channel (TraceChannel), and returns them as an array. It works like GetPartBoundsInSphere, but performs collision detection based on a collision channel.

#### Parameters

| `CFrame` InCenter                          | The center coordinate of the sphere-shaped region to detect.                                                                                                             |
| ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `number` InRadius                          | The radius of the sphere.                                                                                                                                                |
| `Enum.CollisionChannel` TraceChannel       | The collision channel used for collision detection. Only objects whose response to this channel is set to Block or Overlap become detection targets.                     |
| `CollisionQueryParams` InQueryParams       | An object that can configure detailed conditions for collision queries, including which objects to be detected or ignored. If not specified, the default settings apply. |
| `CollisionResponseParams` InResponseParams | An object specifying the response behavior for each collision channel. If not specified, the default response settings apply.                                            |

#### Return

| `Array` | An array of objects detected within the sphere-shaped region. |
| ------- | ------------------------------------------------------------- |

#### Code Samples

### GetPartBoundsInSphereByChannelName

Finds parts overlapping a sphere-shaped region defined by a given Center and Radius, filtered by the name of the specified collision channel (ChannelDisplayName), and returns them as an array. It works like GetPartBoundsInSphereByChannel, but allows specifying the collision channel by name (string) instead of Enum.CollisionChannel. Internally, it converts the name to a collision channel and then calls GetPartBoundsInSphereByChannel; if no channel matching the given name is found, it does not perform detection.

#### Parameters

| `CFrame` InCenter                          | The center coordinate of the sphere-shaped region to detect.                                                                                                                                                      |
| ------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `number` InRadius                          | The radius of the sphere.                                                                                                                                                                                         |
| `string` ChannelDisplayName                | The name of the collision channel used for collision detection. The search prioritizes channel names registered in the collision profile; if no channel with the given name is found, detection is not performed. |
| `CollisionQueryParams` InQueryParams       | An object that can configure detailed conditions for collision queries, including which objects to be detected or ignored. If not specified, the default settings apply.                                          |
| `CollisionResponseParams` InResponseParams | An object specifying the response behavior for each collision channel. If not specified, the default response settings apply.                                                                                     |

#### Return

| `Array` | An array of objects detected within the sphere-shaped region. Returns an empty array if no collision channel matching the given name is found. |
| ------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |

#### Code Samples

### GetPartsInPart

Searches for and returns an array of all parts that overlap (collide) with a specified BasePart. Use OverlapParams to fine-tune filtering conditions, such as including or excluding specific objects.

#### Parameters

| `BasePart` InBasePart           | The part used as the reference for collision detection.                                                                                                                                                                                |
| ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `OverlapParams` InOverlapParams | A settings object that configures object detection conditions. Use OverlapParams to exclude specific parts or set a collision group. If not specified, the default settings apply, and all objects become potential detection targets. |

#### Return

| `Array` | An array of the objects detected within the part region. |
| ------- | -------------------------------------------------------- |

#### Code Samples

### PredictProjectilePathByChannel

Calculates and returns the predicted trajectory of a projectile, using the specified collision channel (InTraceChannel) for collision detection. It works like PredictProjectilePathByObject, but performs collision detection based on a collision channel.

#### Parameters

| `Enum.CollisionChannel` InTraceChannel      | The collision channel used for collision detection. Only objects whose response to this channel is set to Block or Overlap become detection targets. |
| ------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| `PredictProjectilePathParams` PredictParams | An object containing the parameters required for trajectory prediction, such as the projectile's starting position, velocity, and gravity.           |
| `CollisionResponseParams` InResponseParams  | An object specifying the response behavior for each collision channel. If not specified, the default response settings apply.                        |

#### Return

| `PredictProjectilePathResult` | A result object containing information about the first object the projectile collided with along its trajectory. |
| ----------------------------- | ---------------------------------------------------------------------------------------------------------------- |

#### Code Samples

### PredictProjectilePathByChannelName

Calculates and returns the predicted trajectory of a projectile, using the name of the specified collision channel (ChannelDisplayName) for collision detection. It works like PredictProjectilePathByChannel, but allows specifying the collision channel by name (string) instead of Enum.CollisionChannel. Internally, it converts the name to a collision channel and then calls PredictProjectilePathByChannel; if no channel matching the given name is found, it does not perform trajectory prediction.

#### Parameters

| `string` ChannelDisplayName                 | The name of the collision channel used for collision detection. The search prioritizes channel names registered in the collision profile; if no channel with the given name is found, trajectory prediction is not performed. |
| ------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `PredictProjectilePathParams` PredictParams | An object containing the parameters required for trajectory prediction, such as the projectile's starting position, velocity, and gravity.                                                                                    |
| `CollisionResponseParams` InResponseParams  | An object specifying the response behavior for each collision channel. If not specified, the default response settings apply.                                                                                                 |

#### Return

| `PredictProjectilePathResult` | A result object containing information about the first object the projectile collided with along its trajectory. Returns an empty result object if no collision channel matching the given name is found. |
| ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

#### Code Samples

### PredictProjectilePathByObject

Calculates and returns the predicted trajectory of a projectile based on object query parameters.

#### Parameters

| `PredictProjectilePathParams` PredictParams | An object containing parameters required for trajectory prediction, including the projectile's starting position, velocity, and gravity. |
| ------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `CollisionObjectQueryParams` InObjectParams | An object specifying which object types should be detected for collisions. Allows setting specific object types as collision targets.    |

#### Return

| `PredictProjectilePathResult` | A result object containing information about the first object the projectile collided with along its trajectory. |
| ----------------------------- | ---------------------------------------------------------------------------------------------------------------- |

#### Code Samples

### Raycast

Casts an invisible ray based on a given origin and direction to detect objects along its path, and returns the result as a RaycastResult object. You can use a RaycastParams object to define specific targets or conditions for detection if needed. If omitted, the default settings apply, and all parts become detectable.

#### Parameters

| `Vector3` InOrigin              | The origin point from which the ray is cast.                                                                                                                                                                                           |
| ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Vector3` InDirection           | A vector representing the ray’s direction; its length (size) also determines the detectable distance.                                                                                                                                  |
| `RaycastParams` InRaycastParams | A settings object that configures object detection conditions. Use RaycastParams to exclude specific parts or set a collision group. If not specified, the default settings apply, and all objects become potential detection targets. |

#### Return

| `RaycastResult` | A result object containing information about the first object the ray collided with along its path. Returns nil if no collision occurs. |
| --------------- | --------------------------------------------------------------------------------------------------------------------------------------- |

#### Code Samples

```lua
local Workspace = game:GetService("Workspace")

local Origin = Vector3.new(0, 50, 0)
local Direction = Vector3.new(0, 0, -3000)

local RaycastParams = RaycastParams.new()
RaycastParams.FilterType = Enum.RaycastFilterType.Exclude
RaycastParams.FilterDescendantsInstances =
{
    Workspace.Part
}

local Result = Workspace:Raycast(Origin, Direction, RaycastParams)
if Result then
    print("Result Position : ", Result.Position)
    print("Result Name : ", Result.Instance.Name)
else
    print("Result nil")
end
```

### RaycastMulti

Casts a ray based on a given origin and direction to detect all objects along its path, and returns the results as an array. Unlike Raycast, which returns only the first collision, it returns all collision results along the ray's path. Useful for penetration effects and multiple target detection.

#### Parameters

| `Vector3` InOrigin              | The origin point from which the ray is cast.                                                                                                                                                                                           |
| ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Vector3` InDirection           | A vector representing the ray’s direction; its length (size) also determines the detectable distance.                                                                                                                                  |
| `RaycastParams` InRaycastParams | A settings object that configures object detection conditions. Use RaycastParams to exclude specific parts or set a collision group. If not specified, the default settings apply, and all objects become potential detection targets. |

#### Return

| `Array` | An array of all RaycastResult objects detected along a ray’s path. |
| ------- | ------------------------------------------------------------------ |

#### Code Samples

```lua
local Workspace = game:GetService("Workspace")

local Origin = Vector3.new(0, 50, 0)
local Direction = Vector3.new(0, 0, -3000)

local RaycastParams = RaycastParams.new()
RaycastParams.FilterType = Enum.RaycastFilterType.Exclude
RaycastParams.FilterDescendantsInstances =
{
    Workspace.Part
}

local Results = Workspace:RaycastMulti(Origin, Direction, RaycastParams)
for _, Result in ipairs(Results) do
    print("Hit instance:", Result.Instance.Name)
    print("Hit position:", Result.Position)
end
```

### RaycastMultiByChannel

Casts a ray based on a given origin and direction, detects all objects along its path filtered by the specified collision channel (TraceChannel), and returns the results as an array. It works like RaycastMulti, but performs collision detection based on a collision channel.

#### Parameters

| `Vector3` InOrigin                         | The starting point from which the ray is cast.                                                                                                                           |
| ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `Vector3` InDirection                      | A vector representing the ray's direction; its length (size) also determines the detectable distance.                                                                    |
| `Enum.CollisionChannel` TraceChannel       | The collision channel used for collision detection. Only objects whose response to this channel is set to Block or Overlap become detection targets.                     |
| `CollisionQueryParams` InQueryParams       | An object that can configure detailed conditions for collision queries, including which objects to be detected or ignored. If not specified, the default settings apply. |
| `CollisionResponseParams` InResponseParams | An object specifying the response behavior for each collision channel. If not specified, the default response settings apply.                                            |

#### Return

| `Array` | An array of all RaycastResult objects detected along the ray's path. |
| ------- | -------------------------------------------------------------------- |

#### Code Samples

```lua
local Workspace = game:GetService("Workspace")

local Origin = Vector3.new(0, 50, 0)
local Direction = Vector3.new(0, 0, -3000)
local TraceChannel = Enum.CollisionChannel.L_ECC_WeaponTrace

local Results = Workspace:RaycastMultiByChannel(Origin, Direction, TraceChannel)
for _, Result in ipairs(Results) do
    print("Hit instance:", Result.Instance.Name)
    print("Hit position:", Result.Position)
end
```

### RaycastMultiByChannelName

Casts a ray based on a given origin and direction, detects all objects along its path filtered by the name of the specified collision channel (ChannelDisplayName), and returns the results as an array. It works like RaycastMultiByChannel, but allows specifying the collision channel by name (string) instead of Enum.CollisionChannel. Internally, it converts the name to a collision channel and then calls RaycastMultiByChannel; if no channel matching the given name is found, it does not perform detection.

#### Parameters

| `Vector3` InOrigin                         | The starting point from which the ray is cast.                                                                                                                                                                    |
| ------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Vector3` InDirection                      | A vector representing the ray's direction; its length (size) also determines the detectable distance.                                                                                                             |
| `string` ChannelDisplayName                | The name of the collision channel used for collision detection. The search prioritizes channel names registered in the collision profile; if no channel with the given name is found, detection is not performed. |
| `CollisionQueryParams` InQueryParams       | An object that can configure detailed conditions for collision queries, including which objects to be detected or ignored. If not specified, the default settings apply.                                          |
| `CollisionResponseParams` InResponseParams | An object specifying the response behavior for each collision channel. If not specified, the default response settings apply.                                                                                     |

#### Return

| `Array` | An array of all RaycastResult objects detected along the ray's path. Returns an empty array if no collision channel matching the given name is found. |
| ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |

#### Code Samples

```lua
local Workspace = game:GetService("Workspace")

local Origin = Vector3.new(0, 50, 0)
local Direction = Vector3.new(0, 0, -3000)
local ChannelDisplayName = "WeaponTrace"

local Results = Workspace:RaycastMultiByChannelName(Origin, Direction, ChannelDisplayName)
for _, Result in ipairs(Results) do
    print("Hit instance:", Result.Instance.Name)
end
```

### RaycastMultiByObject

Casts a ray based on object query parameters, detects all objects along its path, and returns the results as an array. It works like RaycastMulti, but performs collision detection based on object type.

#### Parameters

| `Vector3` InOrigin                          | The origin point from which the ray is cast.                                                                                          |
| ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| `Vector3` InDirection                       | A vector representing the ray’s direction; its length (size) also determines the detectable distance.                                 |
| `CollisionQueryParams` InQueryParams        | An object that can configure detailed conditions for collision queries, including which objects to be detected or ignored.            |
| `CollisionObjectQueryParams` InObjectParams | An object specifying which object types should be detected for collisions. Allows setting specific object types as collision targets. |

#### Return

| `Array` | An array of all RaycastResult objects detected along a ray’s path. |
| ------- | ------------------------------------------------------------------ |

#### Code Samples

```lua
local Workspace = game:GetService("Workspace")

local Origin = Vector3.new(0, 50, 0)
local Direction = Vector3.new(0, 0, -3000)

local ObjectParams = CollisionObjectQueryParams.new()
ObjectParams:AddObjectTypeToQuery(Enum.CollisionChannel.L_ECC_Pawn)

local Results = Workspace:RaycastMultiByObject(Origin, Direction, nil, ObjectParams)
for _, Result in ipairs(Results) do
    print("Hit instance:", Result.Instance.Name)
end
```

### RaycastMultiByProfile

Casts a ray based on the specified collision profile (ProfileName), detects all objects along its path, and returns the results as an array. It works like RaycastMulti, but performs collision detection based on a collision profile.

#### Parameters

| `Vector3` InOrigin                   | The origin point from which the ray is cast.                                                                                                            |
| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Vector3` InDirection                | A vector representing the ray's direction; its length (size) also determines the detectable distance.                                                   |
| `string` ProfileName                 | The name of the collision profile used for collision detection. The detection targets are determined by the collision response settings of the profile. |
| `CollisionQueryParams` InQueryParams | An object that can configure detailed conditions for collision queries, including which objects to be detected or ignored.                              |

#### Return

| `Array` | An array of all RaycastResult objects detected along a ray's path. |
| ------- | ------------------------------------------------------------------ |

#### Code Samples

```lua
local Workspace = game:GetService("Workspace")

local Origin = Vector3.new(0, 50, 0)
local Direction = Vector3.new(0, 0, -3000)
local ProfileName = "Weapon"

local Results = Workspace:RaycastMultiByProfile(Origin, Direction, ProfileName)
for _, Result in ipairs(Results) do
    print("Hit instance:", Result.Instance.Name)
end
```

### RaycastSingleByChannel

Casts a ray based on a given origin and direction, detects the first object hit along its path filtered by the specified collision channel (TraceChannel), and returns the result as a RaycastResult object. It works like Raycast, but performs collision detection based on a collision channel.

#### Parameters

| `Vector3` InOrigin                         | The starting point from which the ray is cast.                                                                                                                           |
| ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `Vector3` InDirection                      | A vector representing the ray's direction; its length (size) also determines the detectable distance.                                                                    |
| `Enum.CollisionChannel` TraceChannel       | The collision channel used for collision detection. Only objects whose response to this channel is set to Block or Overlap become detection targets.                     |
| `CollisionQueryParams` InQueryParams       | An object that can configure detailed conditions for collision queries, including which objects to be detected or ignored. If not specified, the default settings apply. |
| `CollisionResponseParams` InResponseParams | An object specifying the response behavior for each collision channel. If not specified, the default response settings apply.                                            |

#### Return

| `RaycastResult` | A result object containing information about the first object the ray collided with. Returns nil if no collision occurs. |
| --------------- | ------------------------------------------------------------------------------------------------------------------------ |

#### Code Samples

```lua
local Workspace = game:GetService("Workspace")

local Origin = Vector3.new(0, 50, 0)
local Direction = Vector3.new(0, 0, -3000)
local TraceChannel = Enum.CollisionChannel.L_ECC_WeaponTrace

local Result = Workspace:RaycastSingleByChannel(Origin, Direction, TraceChannel)
if Result then
    print("Hit instance:", Result.Instance.Name)
    print("Hit position:", Result.Position)
else
    print("Result nil")
end
```

### RaycastSingleByChannelName

Casts a ray based on a given origin and direction, detects the first object hit along its path filtered by the name of the specified collision channel (ChannelDisplayName), and returns the result as a RaycastResult object. It works like RaycastSingleByChannel, but allows specifying the collision channel by name (string) instead of Enum.CollisionChannel. Internally, it converts the name to a collision channel and then calls RaycastSingleByChannel; if no channel matching the given name is found, it does not perform collision detection.

#### Parameters

| `Vector3` InOrigin                         | The starting point from which the ray is cast.                                                                                                                                                                    |
| ------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Vector3` InDirection                      | A vector representing the ray's direction; its length (size) also determines the detectable distance.                                                                                                             |
| `string` ChannelDisplayName                | The name of the collision channel used for collision detection. The search prioritizes channel names registered in the collision profile; if no channel with the given name is found, detection is not performed. |
| `CollisionQueryParams` InQueryParams       | An object that can configure detailed conditions for collision queries, including which objects to be detected or ignored. If not specified, the default settings apply.                                          |
| `CollisionResponseParams` InResponseParams | An object specifying the response behavior for each collision channel. If not specified, the default response settings apply.                                                                                     |

#### Return

| `RaycastResult` | A result object containing information about the first object the ray collided with. Returns nil if no collision occurs or if no collision channel matching the given name is found. |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |

#### Code Samples

```lua
local Workspace = game:GetService("Workspace")

local Origin = Vector3.new(0, 50, 0)
local Direction = Vector3.new(0, 0, -3000)
local ChannelDisplayName = "WeaponTrace"

local Result = Workspace:RaycastSingleByChannelName(Origin, Direction, ChannelDisplayName)
if Result then
    print("Hit instance:", Result.Instance.Name)
else
    print("Result nil")
end
```

### RaycastSingleByObject

Casts a ray based on object query parameters, detects the first colliding object along its path, and returns a RaycastResult object. It works like Raycast, but performs collision detection based on object type.

#### Parameters

| `Vector3` InOrigin                          | The origin point from which the ray is cast.                                                                                          |
| ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| `Vector3` InDirection                       | A vector representing the ray’s direction; its length (size) also determines the detectable distance.                                 |
| `CollisionQueryParams` InQueryParams        | An object that can configure detailed conditions for collision queries, including which objects to be detected or ignored.            |
| `CollisionObjectQueryParams` InObjectParams | An object specifying which object types should be detected for collisions. Allows setting specific object types as collision targets. |

#### Return

| `RaycastResult` | A result object containing information about the first object the ray collided with along its path. Returns nil if no collision occurs. |
| --------------- | --------------------------------------------------------------------------------------------------------------------------------------- |

#### Code Samples

```lua
local Workspace = game:GetService("Workspace")

local Origin = Vector3.new(0, 50, 0)
local Direction = Vector3.new(0, 0, -3000)

local ObjectParams = CollisionObjectQueryParams.new()
ObjectParams:AddObjectTypeToQuery(Enum.CollisionChannel.L_ECC_Pawn)

local Result = Workspace:RaycastSingleByObject(Origin, Direction, nil, ObjectParams)
if Result then
    print("Hit instance:", Result.Instance.Name)
else
    print("Result nil")
end
```

### RaycastSingleByProfile

Casts a ray based on the specified collision profile (ProfileName), detects the first colliding object along its path, and returns a RaycastResult object. It works like Raycast, but performs collision detection based on a collision profile.

#### Parameters

| `Vector3` InOrigin                   | The origin point from which the ray is cast.                                                                                                            |
| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Vector3` InDirection                | A vector representing the ray's direction; its length (size) also determines the detectable distance.                                                   |
| `string` ProfileName                 | The name of the collision profile used for collision detection. The detection targets are determined by the collision response settings of the profile. |
| `CollisionQueryParams` InQueryParams | An object that can configure detailed conditions for collision queries, including which objects to be detected or ignored.                              |

#### Return

| `RaycastResult` | A result object containing information about the first object the ray collided with along its path. Returns nil if no collision occurs. |
| --------------- | --------------------------------------------------------------------------------------------------------------------------------------- |

#### Code Samples

```lua
local Workspace = game:GetService("Workspace")

local Origin = Vector3.new(0, 50, 0)
local Direction = Vector3.new(0, 0, -3000)
local ProfileName = "Weapon"

local Result = Workspace:RaycastSingleByProfile(Origin, Direction, ProfileName)
if Result then
    print("Hit instance:", Result.Instance.Name)
else
    print("Result nil")
end
```

### Spherecast

Moves a sphere-shaped region defined by a given origin and radius into a specified direction, detects any objects along its path, and returns the result as a RaycastResult object. It works like Raycast, but can detect a broader area of Objects as it detects collision in a sphere shape instead of a ray shape. Useful for melee weapon detections and wide-area collision detections.

#### Parameters

| `Vector3` InOrigin              | The origin point of a sphere.                                                                                                                                                                                                          |
| ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `number` InRadius               | The radius of a sphere.                                                                                                                                                                                                                |
| `Vector3` InDirection           | A vector representing the sphere’s movement direction; its length (size) also determines the detectable distance.                                                                                                                      |
| `RaycastParams` InRaycastParams | A settings object that configures object detection conditions. Use RaycastParams to exclude specific parts or set a collision group. If not specified, the default settings apply, and all objects become potential detection targets. |

#### Return

| `RaycastResult` | A result object containing information about the first object the sphere collided with along its path. Returns nil if no collision occurs. |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |

#### Code Samples

### SpherecastSingleByChannel

Moves a sphere-shaped region defined by a given position (CFrame) and Radius into a specified Direction, detects any objects along its path based on the specified collision channel (TraceChannel), and returns the result as a RaycastResult object. It works like Spherecast, but performs collision detection based on a collision channel.

#### Parameters

| `CFrame` InCFrame                          | The coordinate frame representing the sphere's initial position and rotation.                                                                                            |
| ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `number` InRadius                          | The radius of the sphere.                                                                                                                                                |
| `Vector3` InDirection                      | A vector representing the sphere's movement direction; its length (size) also determines the detectable distance.                                                        |
| `Enum.CollisionChannel` TraceChannel       | The collision channel used for collision detection. Only objects whose response to this channel is set to Block or Overlap become detection targets.                     |
| `CollisionQueryParams` InQueryParams       | An object that can configure detailed conditions for collision queries, including which objects to be detected or ignored. If not specified, the default settings apply. |
| `CollisionResponseParams` InResponseParams | An object specifying the response behavior for each collision channel. If not specified, the default response settings apply.                                            |

#### Return

| `RaycastResult` | A result object containing information about the first object the sphere collided with along its path. Returns nil if no collision occurs. |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |

#### Code Samples

### SpherecastSingleByChannelName

Moves a sphere-shaped region defined by a given position (CFrame) and Radius into a specified Direction, detects any objects along its path based on the name of the specified collision channel (ChannelDisplayName), and returns the result as a RaycastResult object. It works like SpherecastSingleByChannel, but allows specifying the collision channel by name (string) instead of Enum.CollisionChannel. Internally, it converts the name to a collision channel and then calls SpherecastSingleByChannel; if no channel matching the given name is found, it does not perform collision detection.

#### Parameters

| `CFrame` InCFrame                          | The coordinate frame representing the sphere's initial position and rotation.                                                                                                                                     |
| ------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `number` InRadius                          | The radius of the sphere.                                                                                                                                                                                         |
| `Vector3` InDirection                      | A vector representing the sphere's movement direction; its length (size) also determines the detectable distance.                                                                                                 |
| `string` ChannelDisplayName                | The name of the collision channel used for collision detection. The search prioritizes channel names registered in the collision profile; if no channel with the given name is found, detection is not performed. |
| `CollisionQueryParams` InQueryParams       | An object that can configure detailed conditions for collision queries, including which objects to be detected or ignored. If not specified, the default settings apply.                                          |
| `CollisionResponseParams` InResponseParams | An object specifying the response behavior for each collision channel. If not specified, the default response settings apply.                                                                                     |

#### Return

| `RaycastResult` | A result object containing information about the first object the sphere collided with along its path. Returns nil if no collision occurs or if no collision channel matching the given name is found. |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |

#### Code Samples

### SpherecastSingleByObject

Moves a sphere-shaped region defined by a given position (CFrame) and Radius into a specified Direction, detects any objects along its path based on object query parameters, and returns the result as a RaycastResult object. It works like Spherecast, but performs collision detection based on object type.

#### Parameters

| `CFrame` InCFrame                           | The coordinate frame representing the initial position and rotation of a sphere.                                                      |
| ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| `number` InRadius                           | The radius of a sphere.                                                                                                               |
| `Vector3` InDirection                       | A vector representing the sphere's movement direction; its length (size) also determines the detectable distance.                     |
| `CollisionQueryParams` InQueryParams        | An object that can configure detailed conditions for collision queries, including which objects to be detected or ignored.            |
| `CollisionObjectQueryParams` InObjectParams | An object specifying which object types should be detected for collisions. Allows setting specific object types as collision targets. |

#### Return

| `RaycastResult` | A result object containing information about the first object the sphere collided with along its path. Returns nil if no collision occurs. |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |

#### Code Samples

### SpherecastSingleByProfile

Moves a sphere-shaped region defined by a given position (CFrame) and Radius into a specified Direction, detects any objects along its path based on the specified collision profile (ProfileName), and returns the result as a RaycastResult object. It works like Spherecast, but performs collision detection based on a collision profile.

#### Parameters

| `CFrame` InCFrame                    | The coordinate frame representing the initial position and rotation of a sphere.                                                                        |
| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `number` InRadius                    | The radius of a sphere.                                                                                                                                 |
| `Vector3` InDirection                | A vector representing the sphere's movement direction; its length (size) also determines the detectable distance.                                       |
| `string` ProfileName                 | The name of the collision profile used for collision detection. The detection targets are determined by the collision response settings of the profile. |
| `CollisionQueryParams` InQueryParams | An object that can configure detailed conditions for collision queries, including which objects to be detected or ignored.                              |

#### Return

| `RaycastResult` | A result object containing information about the first object the sphere collided with along its path. Returns nil if no collision occurs. |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |

#### Code Samples

## Events
