Change humanoid state in server script

Im not sure if this is a problem or a feature but I’ve tried changing the humanoid state with the Humanoid:ChangeState() method in a script that I’m using. More specifically Humanoid:ChangeState(Enum.HumanoidStateType.Physics) only for it to do nothing. I only got the method to work in a LocalScript and wanted to know if it was a bug or a feature. If it is a feature, are there any alternatives to this or any other way to use the method in a server script?

Have you tried this?

You can, but you need to set network owner to nil for it to be work.

2 Likes

I added the method into my code but It doesn’t transfer ownership. This is the bit of my script its in:

local humanoidRootPart = char:WaitForChild("HumanoidRootPart")
local humanoid = char:WaitForChild("Humanoid")
humanoid.BreakJointsOnDeath = false
humanoid.RequiresNeck = false
		
	
humanoidRootPart:SetNetworkOwner(nil)

if not humanoid:GetState() == Enum.HumanoidStateType.Physics then
   print("Changed State")
	humanoid:ChangeState(Enum.HumanoidStateType.Physics)
end 

Sorry for late reply. I ran into a similar issue. I solved this by adding a task.wait() after humanoidRootPart:SetNetworkOwner(nil), then it worked for me.