So I am trying to play animations on a npc. But a problem I’m having is the animation will not play if HumanoidRootPart is anchored. And when it is not anchored, it’s possible for players to push the npc around. Is there a good alternative that allows me to play animations on npcs without the possibility of other players pushing the npc around?
try creating a bodyvelocity with high maxforce and P but no velocity, this generally makes things ‘anchored’ but still movable under some conditions, idk.
you can also make a tween that lasts as long as the animation (make the tween move the object to it’s own spot) and run it at the same time as the animation, idk.
You could have a WeldConstraint
, attaching the NPC to an invisible, non-collidable part. That way, the HumanoidRootPart isn’t unanchored (allowing you to play the animation), while not allowing players to move the character!
Hi, I tried this, but my NPC will be anchored somehow after a few tries. I’m sure that the anchored part is removed and the “Enabled” property is set to true for the weld constraint.
Make sure you didn’t remove the anchored part, but just unanchored it.
Also, make sure your WeldConstraint is set up correctly. If it’s still not working, I’d suggest sending what it’s looking like right now.
It’s actually not the anchored part’s problem, but I managed to fix it by making a part with touch event to detect if the npc moved there instead of using a move to completed event which is the problem somehow, thank you!
I tried attaching humanoidrootpart to an invisible, non-collidable part (and plus it isn’t anchored) and It won’t do anything but I can still move the NPC, plus if I anchor the invisible non-collidable part, It won’t even play the animation, please help