RootPart messed up after cutscene

After a cutscene, movement seems extremely offset, almost like the rootpart was repositioned or something isn’t aligned anymore.

This occurs after I anchor the humanoidrootpart for a cutscene. I anchor the rootpart in order to prevent both characters in the cutscene from moving as they are both attached via a weldconstraint.

I did check for any existing welds that may have stuck after the cutscene is over, and there are none. I’ve been stuck on this problem for over a week and finally decided to ask for help.

The result is this:

Cutscene:

You are moving the rootpart with Character.HumanoidRootPart.Position/CFrame = …
Instead use the functions assosiated with the Model.

local character = player.Character
--Moving the Character via Position
character:MoveTo(Position)
--Rotating the Character
character:PivotTo(Orientation)
--Moving and Rotating the Character via CFrame
character:SetPrimaryPartCFrame(cframe)

After the cutscene, does the Motor6d that connects the torso to the HumanoidRootPart have a weird offset, or are the particle effects that are animated not deleted properly/not set to massless?

Turns out the solution was much easier than I had anticipated.

When the animation ended, I was instantly removing welds and unanchoring, but it appears that even with a stopped event on the server, the animation is not completely done transitioning back to the old position. This was causing a weird physics bug on the character, which got fixed after playing another animation.

The solution is to add a wait before proceeding to unanchor. A long enough wait would be around 0.5 seconds, or maybe even 0.2, which is just enough for the server to have completely unloaded the animation.

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