Callbacks
Callbacks are functions defined within settings that allow you to define custom behavior of a projectile when certain events occur
Each callback is marked with
rfor direct read permissionwfor direct write permission
There are currently 8 callbacks present
Callbacks
OnStep [rw]
Fires every time the projectile steps even if the velocity is 0
OnPositionChange [rw]
Fires every time the projectile steps except when the velocity is 0
OnPositionChange = function(projectile: Projectile, newPosition: Vector3, oldPosition: Vector3): nil
OnDestroy [rw]
Fires when the projectile is destroyed
OnDestroy = function(projectile: Projectile, reason: string | "MaxTime" | "MaxDistance" | "Hit"): nil
OnHit [rw]
Fires when the projectile hits something
OnTargetLost [rw]
Fires when the projectile exceeds MaxTrackAngle
Note
After OnTargetLost is fired, the target is set to nil
OnCheckpointReached [rw]
Fires when the checkpoint inside of trajectory is reached
Note
After OnCheckpointReached is fired, the checkpoint is set to nil
PostTransform [r]
Due to the way Motor6D.Transform works we made a PostTransform callback which is called right after .Transform is applied for the first time. Otherwise the CFrame of the cosmetic part will appear as origin
PostTransformSafe [r]
This is the 2nd PostTransform. Basically the second time .Transform is applied. This is helpful to safely toggle vfx on or make parts visible to hide the pre .Transform phase