Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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 comment

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..

1 answer

✓ Accepted answer

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.