I have been encountering this issue for a while and I can’t seem to find a solution anywhere. I have an NPC Humanoid which I had disabled all its States except for the Running State. And my NPC keeps falling down then getting back up when CFramed. I want it to never fall down.
However, I did test printing the State changed and obviously it never prints anything since there is only 1 State enabled, that is the Running State.
I have also tried enabling all States or disabling only a few of them but still this keeps on happening.
May I also add, that before giving the Humanoid NPC a new CFrame I am anchoring the HumanoidRootPart and unanchoring it again after it is CFramed.
local dummy = workspace.Dummy
local active = workspace.Green
local inactive = workspace.Red
local count = 0
local humanoid = dummy.Humanoid
humanoid:SetStateEnabled(Enum.HumanoidStateType.Ragdoll, false)
humanoid:SetStateEnabled(Enum.HumanoidStateType.FallingDown, false)
dummy.HumanoidRootPart:SetNetworkOwner(nil)
while true do
count = count+1
print(count)
wait(1)
dummy:SetPrimaryPartCFrame(active.CFrame)
dummy.PrimaryPart.Anchored = false
dummy.HumanoidRootPart:SetNetworkOwner(nil)
wait(1)
dummy.PrimaryPart.Anchored = true
dummy:SetPrimaryPartCFrame(inactive.CFrame)
end
It didn’t trip after I added dummy.HumanoidRootPart:SetNetworkOwner(nil)
Figured out I should avoid this method as it made my NPCs look as if they are in a different position on the client than they really are on the server.