SkillBase
The base class for all skills. Contains methods that are shared between all skills.
Functions
Destroy
SkillBase:Destroy(Flag: "NoReplicate"?) → ()Destroys the skill, cleaning up all objects and connections. Has a flag to prevent replication of the destruction to the client.
Add
SkillBase:Add(Method: string?,Index: any?) → ()
Adds an object to the skill's janitor. This will automatically clean up the object when the skill is destroyed.
The object can be an instance, a signal, or a function. If the object is a signal, the janitor will disconnect the signal when the skill is destroyed.
An optional second argument can be passed to specify the method to call on the object when the skill is destroyed.
Example: Skill:Add(Signal, "Disconnect")
Clone
Clones an object and adds it to the skill's janitor.
PlaySFX
Plays a sound and adds it to the skill's janitor.
Finalize
This item only works when running on the server. ServerSkillBase:Finalize() → ()
Finalizes the skill, and sets the users state back to Idling. Calling this method will start the cooldown and allow the skill to be used again.
Any clients that are using the skill will also receive the Finalize call.
UpdateServerState
This item only works when running on the client. ClientSkillBase:UpdateServerState(StateAction: string,...: any) → ()Sends a request to the server to update the skill's state. Received by the Skill:OnStateUpdate method.
Finalize
This item only works when running on the client. ClientSkillBase:Finalize() → ()Finalizes the skill, and allows the skill to be used again. The client will be free to perform other actions.