NPC falls over when i unanchor him?

i made an animation for my npc which in order to be played the npc has to be anchored. it works fine, but when i un anchor the npc so he can walk, he falls over. it looks kinda hillarious but thats not what i want to achieve. any help appreciated.

106

5 Likes

Could you possibly use BodyGyro? If you set the MaxTorque to inf on the axis it falls on, then set it to 0 on the other two, it would force it to remain upright while allowing it to turn around as normal.

1 Like

i think the axis is random tho

2 Likes

Does your NPC have a Humanoid?

1 Like

yes he does i think you cant animate without one

1 Like

If the NPC only rotates on one axis like a regular roblox character, putting Gyro into the root part and locking the two unused axis may work.

1 Like

Oh yeah, my bad.

local humanoid = workspace.Dummy.Humanoid -- where your humanoid is located
humanoid:SetStateEnabled(Enum.HumanoidStateType.Ragdoll, false)
humanoid:SetStateEnabled(Enum.HumanoidStateType.FallingDown, false)

Maybe try adding this small code? This stops the humanoid from falling down and ragdolling.

9 Likes

Yeah that seems to work fine. Thanks!

2 Likes