Changing the humanoid state only works in a local script?

Basically, I’ve been having trouble with a ragdoll script that I’ve made. I tried using the PlatformStand attribute of the humanoid to stop the player from moving when ragdolled but It is way too buggy (I can’t seem to make the player get up via script . They just get up when they feel like it) and inconsistent. So I tried humanoid state types and none of them seemed to work. my script is handled entirely on a server script and would not work in a local one which is a problem since I have only got the state types to work on a local script which does not work for me. Are there any alternatives to this? I’ve been stumped at this issue for 2 days now and Its really bothering me.