I am creating a moving rocket using BodyForce and tweening the speed in a server script to make it look like it goes faster as it speeds up. Players can enter the rocket as it takes off, however, this happens:
I can’t assure you this will work, because I would have to do the tests before claiming that, but maybe solution of this post could help. While the rocket is flying, maybe you can automatically correct character’s CFrame.
The fastest solution would be simply adding seats, and not letting player move around during the flight, but I don’t think that’s what you are looking for.
Seats would not work as this isn’t a passenger rocket. It is a rocket robbery where players need to be moving about. I will have a look through that post.
EDITED
It looks like you should try to adjust only Y-axis and leave X- and Z-axis to player’s choice. Currently, player’s lower torso (or is it HumanoidRootPart?) position is continuously being corrected to rocket’s CFrame.
Please excuse my late replying. I don’t know if the problem has been solved yet, but looks like with having enough velocity, a player will still be able to move through a wall. What you can also do is give players inside a rocket some upward directioned velocity.
Since then I have come up with another solution that involves using prismatic constraints to move the rocket up and down. However, after a while players start bouncing around a lot and get flung and clip outside the rocket. Your solution sounds feasible but how would I know how much upward velocity to apply on players? I am using tweens so the amount would have to tween with the rocket.
For the solution created on my post, the platform the player is standing on must be cframed, or else it will not work. Just tween the rocket position and it should work as intended.
You can get the velocity of the rocket and apply the same value to each player.
I would really like to help, but don’t have much experience with body movement. I presume you tried using prismatic constraints like okeanskiy. The difference is that his elevator moves at a very slow speed, and doesn’t meet the problem with player’s physics. The elevator moves really smoothly at lower speeds though.
This is another post I found regarding the same issue, but solution in my first post was used.
I have no problem with moving the rocket. Prismatic constraints work perfectly, however at high speeds players bounce a lot and get flung. I considered the velocity option however I wasn’t sure how much velocity I should put on the player, since the speed is tweened.
I don’t know about that. Using velocity, you could at least reduce the force with which player is pressing against the floor. Like you said, the main problem is constant speed growing, so you simply can’t achieve the wanted result this way. Technically, you could, but it would be very performance draining to update each client’s upwards velocity multiple times per milisecond. What you can do instead is test what happens when you get rocket velocity each second and see how it performs if you apply it to players less regularly.