Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Players glitch through elevator on laggy servers, how do I fix this?

Asked by 5 years ago

I built an elevator that uses CFrame to move up and down, but on laggy servers, the player may glitch through. Without using a seat, is there a way I can fix this?

1
Moving a platform by setting CFrame on the server is always going to be glitchy due to infrequent and erratic replication. You should use one of the Physics system options (like PrismaticConstraint). Even still, players don't really collide with the floor, they do raycasts down and hover. Above a certain vertical speed, you still may need to weld them to the elevator floor.. EmilyBendsSpace 1025 — 5y

1 answer

Log in to vote
1
Answered by
Robin5D 186
5 years ago

You should use something like a constraint based system for smoother movement and replication, and probably use TranslateBy if you continue to use a CFrame loop. You might also want to have the client do all the CFrame work to stop replication issues, likely using FireAllClients with a remoteevent.

Ad

Answer this question