I am creating a Deepwoken-style combat system where NPCs and Players have physical collisions (blocking each other). I want my NPCs to remain perfectly upright at all times, especially during high-velocity moves like “Air Criticals” or dashes, without them “tripping” or falling over into a ragdoll-like state when they collide with the player or hit the ground.
Despite disabling several HumanoidStateTypes, the NPC still occasionally completely falls over when applying BodyVelocity or TweenService movements. In my “Air Critical” move, the NPC launches up and slams down; if they clip the player’s hitbox on the way, they lose their vertical balance and “trip,” staying stuck on the ground, the same thing happens when they dash into the player.
- I disabled states:
Jumping,Dead,FallingDown,Ragdoll,Physics, andGettingUpviaSetStateEnabled. - I implemented an
AlignOrientationfacing system withPrimaryAxisLookAt. - I switched from
BodyVelocitytoTweenServicefor NPC movement to avoid physics-based tripping, but the character still occasionally tips over upon landing.
Here is the setup for my orientation system and the state-disabling logic I’m using in my CombatController:
humanoid:SetStateEnabled(Enum.HumanoidStateType.FallingDown, false)
humanoid:SetStateEnabled(Enum.HumanoidStateType.Ragdoll, false)
humanoid:SetStateEnabled(Enum.HumanoidStateType.GettingUp, false)
humanoid:SetStateEnabled(Enum.HumanoidStateType.Physics, false)
-- My Facing/Stabilization System
local function setupFacingSystem()
attachmentBase = Instance.new("Attachment", rootPart)
alignOrientation = Instance.new("AlignOrientation", rootPart)
alignOrientation.Mode = Enum.OrientationAlignmentMode.OneAttachment
alignOrientation.AlignType = Enum.AlignType.PrimaryAxisLookAt
alignOrientation.PrimaryAxis = Vector3.new(0, 0, -1)
alignOrientation.SecondaryAxis = Vector3.new(0, 1, 0)
alignOrientation.Attachment0 = attachmentBase
alignOrientation.RigidityEnabled = true -- Attempted to lock physics
end
Is there anyway to stop the NPC from tripping over? I know games like Deepwoken solve this problem, but I am not too familiar with humanoids yet to do it myself. Here is a clip of it happening: