Hello! I’m working on my fighting game, and there’s a lot of movement and knockback mechanics. This leads to players frequently falling over, being stuck in place for 5 seconds until the humanoid attempts to get up.
I’ve tried a lot of solutions, ranging from disabling the tripping, freefall, and platform states, to resetting the rootpart cframe to a neutral position with code, to instancing an alignorientation. None of these worked consistently. The best solution I’ve found so far is setting the state to “getting up” at the end of my knockback function, but this sometimes doesn’t work, and it also doesn’t help if the player trips on a part.
Without seeing exaclty what happens I can only give some ideas.
Check if a movement command is excecuted but the humanoids Position or Orientation doesn’t change you could call a function that would move the humanoid a couple of studs and retry the requested movement.
I often seen when humanoids and players get stuck in a part they often end up horizontal in the part. If this is the case you could check if the humanoids Orientation is within a certain range (approx horizontal) and if so reset it to a correct postion.
Sometimes players and humanoids get stuck in a falling postion. You can again use a script like this to detect that:
humanoid.StateChanged:Connect(function(_, newState)
if newState == Enum.HumanoidStateType.FallingDown then
--Use a function like below to change the state or change the position or orientation again
humanoid:ChangeState()
end
end)