Issues with CFramed tram

Hello everyone,

I’ve been trying to make a tram, that follows a scripted CFrame path. But with that is that the Humanoid doesn’t follow the tram.
The main part is anchored and the rest is welded to that part (I’m using TweenService and a dummy CFrame value to move the PrimaryPart, the tram is moved locally).

I’ve used this script to make the humanoid follow the train. In my testing game this works fine but still with a bit of lag.
In the main game, with the same exact script it bugs out like the following footage:

Testing place:


Main game:

To the player the tram just moves smoothly without it bugging out. (The video may lag but in-game it doesn’t)

Any idea how this could be caused and how to fix it?
Thanks!

1 Like

This post might help you, it talks about a similar issue, albeit with a minecart rather than a tram. Essentially you can use AlignOrientation/AlignPosition to get the effect you want.

Thanks!
I’ve tried this but the problem is that here the Humanoid also doesn’t follow the train. And it seems that using the same script I have now doesn’t do anything when using AlignOrientation/AlignPosition.

1 Like