Alright, Let me get straight to the point. I have a train game. The train uses tweenService to move. And I set the Velocity of the trains base to match the speed of the tween. However, sometimes, both arent match for a short milisecond and this causes the player to glitch. I just wanted to ask if there is any better way to keep the player on the part while its being tweened
1 Like
Scottifly
(Scottifly)
December 21, 2022, 6:42am
#2
There are a lot of previous posts about very similar topics.
Try tweening the train to make it move. Since this relies on Position and CFrames and not physics, it should work
This is working as expected
The player doesn’t stay on your train because the train has no velocity, its simply having its position changed every frame. You will not get any physical reactions if you do this.
You’d want to drive the trains motion via constraints, either by diretly applying VectorForce/LinearVelocity, or actually spinning the wheels with HingeConstraints, or some other simulated system.
Or, you’d need to write code for the player (and anything else you want to have interactio…
I slightly modified your script to work with unanchored objects moved by body movers. I changed the humanoid states to only work if you are falling or jumping, which lets Roblox handle the physical contact, and the script moves you back after you jump. I also adjusted the ray length, so it won’t push you back if you try to hop on from the front.
--BrahGames 07-27-2021 rewritten https://devforum.roblox.com/t/jailbreak-train-platform-system/236339
--slightly edited to work with bodymovers and su…
I’m attempting to accomplish a Train that moves, but how can I move the players with the train when the cab moves. Currently when you move a part the player is standing on with CFrame, the brick moves, and the player will stay at the current position, thus resulting in the player falling off.
Is there any way to accomplish this? It appears Jailbreak has done this before, although I’m not sure it was CFrame they used to move their train.
1 Like
system
(system)
Closed
November 15, 2023, 12:35pm
#3
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.