Skip to main content

Configuring Humanoid Data

To set the Humanoid Data of your status effect you can use a built-in method SetHumanoidData(). Let's modify our stun status to set the player's WalkSpeed to zero.

note

You can use SetHumanoidData() method on client, however the changes will be overriden with a next server change of Humanoid Data.

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

@StatusEffectDecorator
export class Stun extends StatusEffect {
public OnStartServer() {
this.SetHumanoidData({ WalkSpeed: [0, "Set"] })
}
}