-
Notifications
You must be signed in to change notification settings - Fork 2
ClientCaster API
[Read-Only]
RaycastParams RaycastParams
Returns the ClientCaster
's set RaycastParams.
[Read-Only]
Boolean Debug
Returns whether the ClientCaster
object has debug mode enabled, visualizing the ClientCaster
's rays.
[Read-Only]
Boolean Recursive
Determines whether the Caster object will search for Raycast points (DmgPoint
s) from the whole object's descendants, rather then the object's direct children.
[Read-Only]
BasePart Object
Returns the object that the ClientCaster
is raycasting from.
[Read-Only]
Player Owner
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.
[Read-Only]
Boolean Disabled
Returns whether the ClientCaster
is disabled (not raycasting).
[Yielding]
Number GetPing()
If the ClientCaster
object has a set Owner
, it will return the ping of that player by calculating delay between client-server. NOTE This is a yielding function, and it will yield until it get's the players ping.
Void StartDebug()
Starts the debug trails of the ClientCaster
.
Void DisableDebug()
Disables the debug trails of the ClientCaster
.
when set to true
, the ClientCaster
object will search for Raycast points (DmgPoint
s) from the whole Object
's descendants, rather then the Object
's direct children. Useful for models and characters.
Determines how long the ClientCaster:GetPing()
method can yield for before resuming, to protect against potential exploiting. Default exhaustion time is 1
.
Number GetMaxPingExhaustion()
Returns how long the ClientCaster:GetPing()
method can yield before resuming.
Toggles debug mode of this ClientCaster
. This feature is light-weight but is not nonetheless not recommended for in-game use.
Void Destroy()
Destroys this ClientCaster
object, efficiently cleaning up what's left using a Maid.
Void Start()
Starts this ClientCaster
object, starting to raycast for the hit detection.
Void Stop()
Stops this ClientCaster
object, stopping raycasts for hit detection.
Sets the given Player as owner for this caster object.
When NewOwner
is nil, the server will be the owner instead of a Player.
Void 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.
Void EditRaycastParams(RaycastParams RaycastParameters)
Updates the ClientCaster
's RaycastParams property.
BasePart GetObject()
Returns the object this ClientCaster
is raycasting from.
Sets this ClientCaster
's object which it will raycast from to Object
.
Signal Collided(RaycastResult)
Fires whenever any object intersects any one of the ClientCaster
's rays.
Signal HumanoidCollided(RaycastResult, Humanoid)
Fires whenever any of the ClientCaster
's rays intersect with an object, whose parent has a Humanoid object.