ClientCaster
An object which handles raycasting and client-communication.
Properties
RaycastParams
This item is read only and cannot be modified. Read OnlyClientCaster.RaycastParams:
RaycastParams
Returns the ClientCaster's set RaycastParams.
Debug
This item is read only and cannot be modified. Read OnlyClientCaster.Debug:
boolean
Returns whether the ClientCaster object has debug mode enabled, visualizing the ClientCaster's rays.
Recursive
This item is read only and cannot be modified. Read OnlyClientCaster.Recursive:
boolean
Determines whether the Caster object will search for Raycast points (DmgPoints) from the whole object's descendants, rather then the object's direct children.
Object
This item is read only and cannot be modified. Read OnlyClientCaster.Object:
Instance
Returns the object that the ClientCaster is raycasting from.
Owner
This item is read only and cannot be modified. Read OnlyClientCaster.Owner:
Player?
Returns the current Player who is the owner of the caster, or nil in case of the server. The owner calculates intersections, and as such it's recommended to have the client calculate it to have less of a burden on the server.
Disabled
This item is read only and cannot be modified. Read OnlyClientCaster.Disabled:
boolean
Returns whether the ClientCaster is disabled (not raycasting).
Collided
EventsFires whenever any object intersects any one of the ClientCaster's rays.
HumanoidCollided
EventsFires whenever any of the ClientCaster's rays intersect with an object, whose ancestor Model has a Humanoid object.
Functions
DisableDebug
ClientCaster:
DisableDebug
(
) →
(
)
Disables the debug trails of the ClientCaster.
StartDebug
ClientCaster:
StartDebug
(
) →
(
)
Starts the debug trails of the ClientCaster.
Start
ClientCaster:
Start
(
) →
(
)
Starts this ClientCaster object, beginning to raycast for the hit detection.
Destroy
ClientCaster:
Destroy
(
) →
(
)
Destroys this ClientCaster object, cleaning up any remnant connections.
Stop
ClientCaster:
Stop
(
) →
(
)
Stops this ClientCaster object, stopping raycasts for hit detection.
SetOwner
Sets the given Player as owner for this caster object. When NewOwner is nil, the server will be the owner instead of a Player.
GetOwner
Returns the current Player who is the owner of the caster, or nil in case of the server. The owner calculates intersections, and as such it's recommended to have the client calculate it to have less of a burden on the server.
SetObject
Sets this ClientCaster's object which it will raycast from to Object.
GetObject
Returns the object this ClientCaster is raycasting from.
EditRaycastParams
ClientCaster:
EditRaycastParams
(
RaycastParameters:
RaycastParams
) →
(
)
Updates the ClientCaster's RaycastParams property.
SetRecursive
ClientCaster:
SetRecursive
(
Recursive:
boolean
) →
(
)
when set to true, the ClientCaster object will search for Raycast points (DmgPoints) from the whole Object's descendants, rather then the Object's direct children. Useful for whole model hitboxes and characters.