How can I let the server know to enable and disable hitboxes from an animation safely?

I am trying to make a sword which enables and disables the hitbox at certain parts of the animation, how can I do this without exploiters just firing the event and having their hitbox always active? The animation is played from a localscript.

not sure if your intention is to make your player only see the animation but if you want everyone else to see your avatar playing the animation then you should play the animation on the server.

in the animation track u could also add keyframe signals / events and using ‘GetMarkerReachedSignal’ then you could enable or disable the hitbox which should also be done on the server as well as any validation checks such as cooldowns etc. hope that helps!

i thought if you play an animation local it replicates and that it is better to do the animation on the client for attacks because it is more reactive, i was going to use keyframe signals until i realized it could be exploited. how do games usually enable and disable the hitbox at the right time? i feel like i am just overcomplicating

If you absolutely must match the keyframes of an animation to the turning on or off of a hitbox, how about having the server handle something like a cooldown when sending the signal, and reject the event if it’s not on cooldown?

yeah i think ill do that thanks