Skip to main content

Define The Behavior

Now, after we created our first ability we need to define its custom behavior. Right now, lets make it print something when player starts the ability and add a small cooldown for it:

attack.ts
import { Skill, SkillDecorator } from "@rbxts/wcs";

@SkillDecorator
export class Attack extends Skill {
public OnStartServer() {
print("Hi, attack just started!");
this.ApplyCooldown(3) // 3 second cooldown
}
}

Okay! That's great, but let's start our ability!