How Can I Move a Player With a Tweening a Model? e.g. Like Jailbreak's Train Sytsem

Ok so, Basically I want to be able to make players move with a model whilst it is tweening so when a player goes onto/touches the model they will start to move along with the model

The Only Problem Is that I have No Idea where to start I’m very familiar with Tween Service But I am Not sure how to make a Player Move Along with it.

I Have Tried Using The Pivot To() Function But I Reconsidered To Using Tween Service As It is Very Efficient And Reliable.

1 Like

I was once scripting an elevator system for somebody and I found out that putting the Character(s) inside the Elevator’s Model (the model that WILL be moving) worked nicely and it was even better when I Welded the Characters’ on the said elevator (basically welded them once it started moving, staying in the position they last were not mid-air lol)

Not sure if welding will be helpful for you in your situation, but I believe doing what I did could make this work. I don’t have another idea in mind that could help you out, but I’d give it a try.

1 Like

This question has already been answered before. Please search up your question before asking it.

Make a non-collideable invisible part that you Tween. Use AlignPosition and AlignOrientation between the model and the part being tweened. It allows players to move with the model and without needed to be welded so they can still move around as they want.

OP wanted to try methods without using CFrames.

1 Like

I Already tried this method before making the post and got an error as soon as I ran the script.
I Tried To Fix The Line Of Code With The error but kept getting the same error numerous times.

What was the error, I’ve used this multiple times without any error.

Ok, so the error I’m getting is “attempt to index nil with ‘Character’”
So basically It seems that the script can’t find the Character.

Make sure the script is in StarterPlayerScripts, and also add a Or CharacterAdded:Wait() to the end. the player hasn’t loaded in fully.

I’m assuming your tweening an anchored model.

Anchored parts do not simulate physics, so their velocity is frozen at what it was when you anchored it. When an unanchored physics object like a player’s character stands on the train, they stand independant of the train’s movement because it’s velocity is 0.
Therefore, you can set the AssemblyLinearVelocity of the train to it’s direction of movement to simulate physics for the anchored object.

Incase you don’t understand:

Conveyors in roblox move parts while being anchored because it’s velocity is set to something other than 0. Unanchored parts act on that velocity as if it was actually moving in that direction.

1 Like

Thanks for your help I really appreciate it as this is my first devforum post

1 Like

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