Player camera lagging behind when riding tweened part

Hello,
I created a research facility game which has a transit system to allow players to get around efficiently. It is setup to be driverless so I opted to use TweenService with client sided tweens to move the train vehicles for reliability and to avoid physics reliant movement options as they tend to be buggy. However when players ride one of the trains, their camera appears to lag behind their character. Here’s a video showing what is happening. https://youtu.be/veVv4JsnR2Y
I am using a script similar to the one found here: Jailbreak train platform system? - #35 by Kord_K. To keep players in place on the moving platform. I have heard that this might be caused by limitations in Roblox’s engine and refresh rates. Is there anyway to stop this issue with the camera or at least make it less buggy?
Thanks!

1 Like

Did you ever figure it out? I am in the exact same situation as you were.

Edit: I figured it out after 2 hours of debugging. I’ll explain how I did it for future readers.

Before you set the humanoidrootpart cframe , save a variable as the humanoidrootpart cframe before setting it and then get the relative value

local camerarelative = humanoidrootpart.CFrame.Position.X - oldhumanoidrootpart.CFrame.Position.X

after set the camera CFrame to itself + the camerarelative

workspace.CurrentCamera.CFrame += camerarelative

Note: my tween was moving in the X direction only so that’s why I only did the x direction for Position.