Carrying system changing carrying player's humanoid state to freefall

I have a function in my game that allows players to pick up and carry ragdolled players. It first used a weld which became deprecated, then a weld constraint which did not allow me to change the CFrame properties, so I changed it to a Motor6D. With all of these there’s been a problem where the carrying player’s humanoid state changes to freefall while they’re carrying a player.

This breaks the fall damage system in my game which runs a while loop to increase fall damage when the player enters freefall and stops to proc fall damage when they exit freefall.

As a result, the fall damage only procs when they stop carrying a player and if they move down in the y axis too much while they’re carrying a player they will die.

local carryConstraint ="Motor6D", character.HumanoidRootPart)
carryConstraint.Name = "MotorConstraint"
carryConstraint.Part0 = character.HumanoidRootPart
carryConstraint.C0 = carryConstraint.C0 +, 1.5, 0)

(the Part1 is changed in the carry function)

“We were a bit overzealous with the joint deprecations: The deprecations of the other legacy joint types were correct but Weld should not have been marked as deprecated. This will be fixed.”

Good to know but still with the weld it changes the carrying player’s humanoid state to freefall.

Try making a bool value for when the player is being carried and make an if then statement in the while loop for that bool value

The problem is for the player who is carrying a player and not the player being carried. The player being carried isn’t supposed to take fall damage and they already don’t.

How about using raycasting instead of the freefalling humanoid state to check how far the player is from the ground

Because there’s other things in my game that use humanoid states such as my climb system and there may be things added that use humanoid states later. I need to fix the problem with carrying causing the carrying player to get stuck in the freefall state, changing the fall damage system is just going to delay the problem.

Setting network ownership of the carried player’s character to the player carrying them fixed the humanoid state type problem.