I need help with preventing an NPC from tripping

I am currently working on a story game and at the end part, I have some problems with keeping the NPC from tripping. If you don’t know what I mean, it’s a humanoid state called FallingDown which makes the humanoid have no animation and lie down on the floor for a few moments and then get back up. The screenshot is what I mean:

I did find a solution that could keep this from happening and it was called SetStateEnabled and it was exactly what I needed. I added it to then code and it sort of worked. It didn’t exactly disable the FallingDown state for the NPC. It did try to stop it, but it didn’t stop it immediately and it didn’t stop it on time. The scenario that I’m using it is that your two friends are falling off a platform into the lava, but they’re hanging on the edge. You save one of them on time and pull them up back to the platform. That stuff worked but I got this FallingDown state. I couldn’t really find anything that helped.

Hello,
You should anchored they HumanoidRootPart’s
And then tween HumanoidRootPart to position you need.

try to disable ragdolls too

Humanoid:SetStateEnabled(Enum.HumanoidStateType.Ragdoll,false)

The NPC’s HumanoidRootPart needs to be unanchored. The HumanoidRootPart needs to be unanchored due to the NPC’s movement.

Couldn’t you also use that code to change FallingDown to be disabled too?

I did anchor the HumanoidRootPart. Instead of tweeting, I did animating

I think that is the problem. However, If I do that, the NPC will just simply fall into the lava. I’ve tested it.

I know this is a nasty bump, but if anyone else is having this problem and can’t find a fix, the solution is the same as stopping a player from tripping. You have to disable the FallingDown state on the NPC’s humanoid from a LocalScript rather than on the server.

2 Likes