Skip to main content

Create a status effect

Status Effects in WCS are classes that represent side-effects. The usage is very similar to skills, you also define their behavior by overriding default methods. They also provide useful tooling for manipulating roblox humanoid stats, e.g, setting the walkspeed when the player should be stunned.

Let's register a simple status effect and make it print something when started:

attack.ts
import { StatusEffect, StatusEffectDecorator } from "@rbxts/wcs";

@StatusEffectDecorator
export class Stun extends StatusEffect {
public OnStartServer() {
print("Stun just started!")
}
}