The problem:
Whenever tweening a part on the server that is welded to a player’s character, that player’s character appears to “hang” wherever it is on other clients’ screens until the tween is complete. This can cause major issues with other scripts that detect hits based on where the server thinks the parts are, when on another client’s screen (the person with the part welded to their character) it may be in an entirely different spot.
I’ve done some digging and I believe I’ve traced the issue to an unintended failure in client-server replication. When a part welded to a player’s character has its size tweened, the server fails to properly process the movement of the player’s character. This issue is then replicated to all other clients, creating the “hanging” or “freezing” effect.
Reproduction steps:
- Either create a local test server in Studio with 2 players or use a live Roblox server with 2 players.
- Weld a part to any part of a player’s character that is unanchored, non-collideable, and massless. Rig type of the character doesn’t matter.
- Tween the size property of the welded part. In all tests I have conducted, tweening other attributes such as transparency or color does not create the same effect.
- On the client of the player who has the part welded to them, everything should appear normal. However, on other players clients, the character of the player with the part welded to their character should appear to “freeze” wherever they are until the tween completes.
Additional information:
This issue has been documented to an extent by another DevForum user. Seen in this post is a video of what occurs when tweening a character-welded part from the server side in addition to a significant amount of other relevant information.
In all tests I have conducted, I have used an R6 character with no additional accessories, and the part I have tweened was welded to the character’s HumanoidRootPart
. However, the issue should be reproduceable by welding the part to any part of the character, so long as it is unanchored/non-collide/massless as mentioned earlier.
Intended behavior:
All players’ clients should see the same thing.
Actual behavior:
As mentioned earlier, the server fails to process the character movement of the player with the welded part during the tween, causing it to erroneously replicate this to all other clients.
Workaround:
Tweening the scale of a SpecialMesh applied to the welded part works fine with no issues.
EDIT: @ContextLost also pointed out changing the RootPriority
of the HumanoidRootPart to something >0 is another viable workaround, thanks for pointing this out
Apologies if this is badly worded, I have Autism so I have issues communicating with others. If you need anything else please do let me know and I’ll see what I can do. Thanks for any help anyone can provide