So I’ve seen many run into this issue before, and I know a few workaround solutions, but that’s not what I’m trying to achieve with this post, if at all possible.
I’m trying to see if a direct solution can be found to Ballsocket constraints not properly processing/updating in certain scenarios.
The limbs of a character who is ragdolled will hang behind until the root part stops being CFrame’d/Pivoted.
The reason the character is being pivoted is because I have a Client > Server > Client replicator script also running, by the way.
Solutions like having a local copy of the ragdoll, networking every limb’s position (ew), and turning off the faster replicator don’t really appeal to me, but I will resort to them if needed. Since I know these work. (except that second one)
Here’s a snippet of the replicator client script that handles moving the root part of the character:
local function MoveRoot(Elapsed: number)
for Player: Player, Frames in pairs(playerRoots) do
local angDiff = Frames.current:AngleBetween(Frames.target)
local posDiff = (Frames.current.Position - Frames.target.Position).Magnitude
if angDiff > 1.6 or posDiff > 10 then
Frames.current = Frames.target
else
Frames.current = Frames.current:Lerp(Frames.target, 30*Elapsed)
end
if not Player.Character --[[or Player.Character:HasTag("Ragdolled") commented out for demonstration purposes]] then continue end
local rootPart: BasePart = Player.Character:FindFirstChild("HumanoidRootPart")
if not rootPart then continue end
rootPart:PivotTo(Frames.current)
end
end
The ragdoll script, while custom is functionally run-of-the-mill. Using ballsocket constraints for it’s joints.