Minimizing the client while Pivoting welded objects is completely and utterly broken

Minimizing the client while pivoting welded objects causes only the anchored parts to pivot while the other parts are left behind. This issue occurs both in studio and in game. It has been causing problems for a game I work on for quite a long time (more than a year) and we’ve only just now figured out how to replicate it (minimizing the game actually seems to cause a whole lot of issues for us).

Visual Aids:

The image below was sent by a tester of the game, which is why it has a watermark


Replication Steps:

  1. Create a model with at least one anchored part that the other unanchored parts are welded to. For more dramatic results, have various anchored parts inside of this model with any number of unanchored parts welded to it.

  2. Run code in the cmd bar to pivot the model with a delay long enough for you to minimize your game.

Here’s some code for this step (remember to minimize immediately after running it). Note that this code is specifically for replicating this in studio with the cmd bar, but this issue does also happen in a live game with regular scripts:

local model = game.Selection:Get()[1] -- make sure to select the model before running

task.delay(4, function()
	model:PivotTo(model:GetPivot() * CFrame.Angles(math.rad(-25), 0, 0))
end)
  1. Observe all of the anchored parts being pivoted to the correct/expected positions and the welded unanchored parts being left behind. The strangest thing is that this happens in Studio too, where I’d expect anchoring and welding to have no effect until physics are activated.

  2. Simply select/deselect (or if you have the Outlines selection style enabled, just hover over) the model and it’ll suddenly snap all of the parts into the expected positions.

Gif of step #4 (the green part here is the only bit that’s anchored). I’m simply hovering over the model to get it to snap into position properly:
RobloxStudioBeta_mnKxB1RfrX

As far as I know, this seems to happen with any type of weld - classic welds, snaps, weld constraints, etc.

Here’s a classic house model to test with (I’ve unanchored all the parts except for the green one at the bottom).

classicHouse.rbxm (41.1 KB)

A private message is associated with this bug report

4 Likes

Whoa, yikes, that’s some crazy behavior.

It isn’t a problem with Problem with PivotTo, but rather any anchored welded assembly movement regardless of the function call or property set you use to do it. It snaps back because the parts are actually physically in the correct place, it’s only the rendering for the parts that’s out of date.

I’ll get someone to look into this.

For now this is the cheapest way you could work around it (invalidates the render for all parts in anchored assemblies when you refocus the window to prompt the renderer into action):

-- LocalScript in StarterPlayer
game:GetService("UserInputService").WindowFocused:Connect(function()
    for _, descendant in workspace:GetDescendants() do 
        if descendant:IsA("BasePart") and descendant:IsGrounded() then
            descendant.LocalTransparencyModifier = 1
            descendant.LocalTransparencyModifier = 0
        end
    end
end)
5 Likes