[Game-breaking] Corescript ragdoll system sets avatar limb positions to Vector3(nan,nan,nan) if triggered while an animation is playing

Reproduction Steps

Currently, as of 10/24/22, if a player gets ragdolled by Roblox’s built-in ragdoll system (can be found in the corescripts) while an animation with Action priority is running in a loop, various limbs of the player’s avatar are positioned to Vector3(nan,nan,nan). This causes all sorts of wild behaviors with the avatar & the humanoid, consistently breaking game logic.

Steps to reproduce:

  1. Open the attached reproduction file
  2. Enable the “China” test player profile under Test → Player:
    image
  3. Run a playsolo session
  4. Observe the “action” priority animation being ran on the avatar
  5. Reset the avatar (via the escape menu)
  6. Observe that the avatar has had various limbs set to Vector3(nan,nan,nan) and is rapidly blinking, among other odd behaviors.

NaNRagdollIssue.rbxl (36.7 KB)

My production game, Super Skyward Towers has recently started getting odd behaviors around the same time this reported bug started occurring. If players are ragdolled, the run animation now continues playing even if they aren’t walking. This was not happening before. It’s possible some engine change is the root cause of this bug.

EDIT : This is critical. This is literally breaking our production game. If a player is in a fall-scream state in our game and they get ragdolled, the nan position bug occurs. This was not happening before. It’s definitely related to an engine change.

Expected Behavior
It is expected that the corescript ragdoll system would ragdoll the player, regardless of what animations are running.

Actual Behavior
The corescript ragdoll system positions various avatar limbs to Vector3(nan,nan,nan) when triggered if there are “action” priority animations being ran on the avatar. It’s worth noting, both animations & the ragdoll system from the corescripts both modify the joints / motor6Ds internally, so there might be some correlation there.

Workaround
None

Issue Area: Engine
Issue Type: Other
Impact: High
Frequency: Constantly
Date First Experienced: 2022-10-24 00:10:00 (-04:00)

6 Likes

Urgent bump, this is breaking our game in production. A recent engine change is causing this issue.

2 Likes

Can replicate, in our game if a player dies they get “flinched”, just a little fling that lasts for 0.18 seconds, (bodyvelocity) however if the player DIES while an animation is playing, they get fling in the void. (This is due to the animation still playing and ragdolls interfering.)

This is still happening as of 10/25/22.

Since I assume you took your own copy of the scripts, can you try commenting out the call to ApplyJointVelocities.

I suspect that function may have been broken during an internal animation runtime rewrite.

1 Like

I’ll give this a try! Will post results here.

Hey @ContextLost! Commenting out ApplyJointVelocities fixed the issue! I’ll leave it commented out as a temporary patch. Hopefully you folks fix the underlying engine issue :slight_smile:

FYI, ApplyJointVelocities has been broken for a while now. I had to fake it.

2 Likes

Hey Noble!

Hope you’re doing well :slight_smile:

Just wanted to let you know we’ll be closing this bug since Avatar Joint Upgrade should provide a native, robust ragdoll system, making this bug obsolete.

Please let us know if this issue is still blocking you and AJU won’t fix it, and we’ll reconsider whether or not we will invest engineering resources / its proper priority.

Best,
M0bsterLobster

1 Like

Hi! I can take a look into this in about 40 minutes. Let me get back to you :slight_smile:

@m0bsterlobster Heya!

I did some testing, it seems ApplyJointVelocities() does not NaN parts anymore from what I’ve tested.

With the new joint upgrade, If I have an animation playing and I trigger the ragdoll, will that preserve the position of the joints from the animation? With Roblox’s corescript ragdoll, if you don’t call ApplyJointVelocities(), the ragdoll will get put into a “t-pose” when triggered instead of preserving limb placement from the currently running animation.

If the answer to that is “yes”, then I believe this bug can be closed out as we’ll switch to the new joint system when time allows :slight_smile:

Yes, you can see this in the Avatar Joint Upgrade demo place when your ragdoll.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.