Issue with server/client when BreakJointsOnDeath = true

When a dummy humanoid dies and BreakJointsOnDeath = true, if the client touches the broken parts, the dummy gets put back together for the client. The server still sees it as broken. This happens in studio and in game. It doesn’t matter whether server has ownership or not.

BreakJointsBug.rbxl (87.9 KB)

Expected behavior

I would expect that the dummy would stay “broken” for both the client and the server.

2 Likes

Hi @TBodda, my name is Rashid and I’ll be looking into the issue you have reported. Thank you for bringing it to our attention!

The first step is that I’ll need to reproduce the issue in order to investigate it further. But I currently am unable to reproduce it. There may be some steps I am missing, I’m particularly curious as to if you have done anything specific to set both of the dummy-avatars into a dead state?

Here are the steps I’ve gone through and the observations I had witnessed:

  1. Launch Studio.

  2. Open the file supplied in this ticket, “BreakJointsBug.rbxl”

  3. Set the Studio menu option: “FILE->Studio Settings->Physics->Are Awake Parts Highlighted” to be checked.

  4. Click “play”

OBSERVATION1: Neither of the dummy avatars begin with any highlights, thereby showing that their parts are not yet “awake” in the physics engine.

After a bit over 70 seconds, the avatar named “OwnerNotSet” shall have its body parts highlighted. While the avatar named “ServerOwned” does not become awake even if I wait for much longer periods.

OBSERVATION2: While an avatar does not have any highlights, if its health is reduced to 0, then it does not fall apart now nor will it fall apart if it later gains highlights. I had set its health to 0 by either selecting its “Humanoid” object in the Workspace and manipulating that object’s “Game->Health” property. Or optionally, by running the following in Studio’s command field: “Workspace.OwnerNotSet.Humanoid:TakeDamage(100)”, where “OwnerNotSet” can be substituted with “ServerOwned”.

OBSERVATION3: Once the wait-period has passed which causes “OwnerNotSet” to gain awake-highlights, then setting that avatar’s health to 0 causes it to break apart. If the player then walks into the broken pieces, it does NOT reproduce the reported bug. That is, the pieces remain detached.

OBSERVATION4: One can force either avatar to become “awake” by moving the player into that avatar, but only for so long as the player is colliding with it. Even then, the reported bug does not reproduce if that avatar’s health is set to 0.

(Even though I am not able to reproduce the reported issue using the steps above, the fact that the dummy avatars do not always fall apart when their health is set to 0 might be another issue in itself.)

Are there steps I am missing? Thank you for any clarification.

I used the same method of selecting the Humanoid and setting its Health to 0. I just tried it again, and it still has the bug for me. I do not have the problem of the dummies not breaking apart. When I turn on Are Awake Parts Highlighted, the dummies are highlighted right away after clicking play and switching to server view. Did you try walking on top of the broken parts for a bit to see if they get put back together?

EDIT: I am now able to reproduce the issue (see my responses after this post). So there’s no need to respond to this post’s request about your Studio settings.

Thank you for the response.
Yes indeed, I have walked over the dismembered NPC parts. Which unfortunately didn’t reproduce the issue on my end.

I’m wondering what might be causing the different observations between the two of us. Perhaps there are some Studio settings we’re not matching on. Could you let me know what the following configurations are set to in your Studio app? I can then set things to be the same on my end.

  • Is there anything listed under “Plugins → Manage Plugins”?
  • Is there anything listed under “File → Advanced → Open flag Editor → Overrides”
  • Anything checked under “File → studio settings → studio → advanced”?
  • Anything checked under, “File → studio settings → studio → Test” ?
  • What is listed under “File → Studio Settings → Diagnostics → Roblox Version”?
  • What is your value for “File → Studio Settings → Network → Incoming Replication Lag”?
  • Under “File → Studio Settings → Physics”, what is checked? What are the values for any fields which show values?
  • What are your settings under, “File → Studio Settings → Rendering”?
  • Do you have anything enabled under, “File → Beta Features”?

Thank you for any details.

Ah, my bad.

The reason why I was not replicating the issue is because I had been setting the dummy’s health to 0 from the client-side. Setting it to 0 from the server-side results in similar observations as you have reported here.

To recap, here are the steps to reproduce. Do feel free to correct/embellish any of these steps if they do not seem accurate or complete to you:

  1. Run the experience.
  2. From the “Test” tab, select the “Current” button to switch to server-view.
  3. Select an npc. Then select that npc’s “humanoid” object in the Explorer pane.
  4. In the “properties” pane, set “health” to 0. Observe that the npc breaks apart.
  5. From the “test” tab, set the “current” button” to “client”.
  6. Move your avatar over the npc’s parts. This might require a little back and forth motion from your avatar if nothing changes immediately.
    Observe that the npc is brought back together.

I’ll continue investigating.

Part of the observed behavior is due to security.
That is, changing a character’s “health” property will not replicate across the client and server. The Health property’s non-replicated nature is listed in the reference docs. Instead, humanoid:TakeDamage should be used.
However, commands executed through Studio’s command bar also shall not be replicated.
These precautions are in order to prevent hackers from altering the health of characters in the experience.

Instead, the server shall need to execute TakeDamage via a script.
I’ve attached a version of the experience which does this.
BreakJointsBug_healthReplicated.rbxl (94.9 KB)
This adds buttons in the lower right to reduce the health of each npc to 0.
The new additions are found in ReplicatedStorage and ServerScriptService.
This addresses the issue for the ServerOwned npc.
(EDIT 2024-June-30: Today the issue is reproducing for me even with the ServerOwned npc, after a similar wait as described below for OwnerNotSet.)

However, the issue still exists for OwnerNotSet. If one waits for a bit (it took about 30 seconds after launch in my most recent trial), then a dismembered OwnerNotSet will become whole again if the player approaches near that npc. This is only the case on the client, the server still shows both npcs as dismembered.

I’ll continue to investigate the remaining portion of the issue. Thank you for your patience.