Player "Shaking/jittering" on elevator issue

Hiwiwi :3
I made a very basic elevator using TweenService for a smooth movement, using prismatic constraints and rods to shrink, etc. The elevator works fine and smooth. But, the player shakes up and down quickly while the elevator moves at high speed.

Is there a way to mantain the player smooth/not shaking while rising at high speed? Not like anchor/freeze the player in a certain position (like seats) keep the player’s ability to walk while elevators moving. Is it posible? Thank u for ur time :3

1 Like

Can you send the script so we can see what is happening

3 Likes

Maybe I should find a better place for this topic, cause the problem its not the script. Im not implementing any script for the player yet… Its more about the engine physics while standing on a moving part. Im just using an script I found on a reply in this forum

1 Like

A really smooth movement is achieved with constraints (Prismatic Constraint). Here is an example

2 Likes

Thank you so much! I will watch it carefully!

Well I mean, the elevator moves perfect, very smooth, the problem is the player standing on it. In that video looks very smooth, but the elevator is going at very slow speed
Thank you, Im gonna watch it :3

1 Like

In my experience this is a hard problem. the more you increase the speed the worse the physics calculations will be and the result will be bad. It will also work badly if more than one player is in it. I haven’t seen anyone who has solved this yet. I’m sorry I can’t be more helpful.

2 Likes

I edited my question to point my problem better. Yup its exactly what u said. Its about the physics calculations.
It happens a lot with any moving part, using hinge or any kind of constraing with motors, etc…
But… idk maybe there’s somekind of solution involved with the player behaviour. Thank you for ur reply :3

1 Like

the shaking effect will most likely be caused with the velocity value of the elevator not matching it’s actual speed when it’s being tweened. When using a constraint that is calculated for you, solving the issue. However, if you want to use a tween, you’ll need to code in the velocity yourself, most likely by using tween service to match it to the speed of the elevator.

3 Likes

Mmm… So you mean, changing the Player’s position smoothly while the elevator is rising? and not depending on the physics of the engine?

1 Like

You could probably anchor the player to the position and move it with the elevator, not too sure if it would work, only thing coming into my head, lol.

2 Likes

Yup I guess that works great, but, I dont want to keep the player “frozen” inside the elevator. I want to keep the ability to walk

1 Like

Have you seen this used somewhere before?

1 Like

Not really. What u mean by that? Is there a way to keep a player “anchored” to a moving part and keep the ability to walk on the part at the same time? :v

Yeah well, Im very new into roblox, so maybe Yes, I should make a better research on this topic :3

1 Like

As far as I know, it isn’t possible. I don’t work with alot of physics myself, so don’t take my word on that. I’ve seen other elevators that use the anchored thing, for example Hexinum

2 Likes

It seems to me that the real problem is replication (apart from the errors of the physics calculations). The calculations of a character is done on the client, while the elevator is done on the server. Between client and server there will always be a delay. That’s why games like Tower Of Hell create their constraints and BodyMovers locally, this way there is no delay but the problem is that the clients no longer match

2 Likes

Yeah, I always ask for weird things due to my lack of experience. I think I should change my entire approach for a high speen elevator. I mean, in real life a high speed elevator, how it behaves? Probably ppl would be sticked at the floor of the elevator due to G-forces, and not happily walking around xD

1 Like

I was asking myself exactly that, why Tower of Hell uses the moving parts on clients? I noticed when I play that theres not matching, and I didnt noticed that maybe this is one of the reasons, prevent the delay, ur right!

1 Like

I don’t think its possible to fix this using the physics engine, but it should be possible by a script that sets the CFrame of the player but at the same time allows the Physics to take place as well, kind of “blending in” with the Roblox physics.

This may help, its about trains but I am pretty sure it can be used for elevators as well or any moving part:

2 Likes

Wow its true! So yes, its by “forgeting” about the engine physics, and set the position of the player relative to a point too…
I guess Im not able to replicate it for now :v
Seems very complex… eveytime I “play” with CFrames and smooth behaviour… well I still failing. But I will try to use this approach, thank you! :3

1 Like