Skip to main content
Up and Coming
September 3, 2025
Solved

How to make an entity follow the player smoothly without network lag?

I'd appreciate any help with this:

I want an entity to follow the player smoothly without network lag, as smoothly as if it were attached to the player but without using the attachToPlayer method.

Right now, I’m updating the follower’s position in World.onUpdate or World.onPrePhysicsUpdate using either a local or server script, but the follower consistently trails behind the player with an inconsistent lag. Setting the owner also didn't help.

gausroth
gausrothAnswer
Honored Contributor
September 3, 2025

If you want smooth movement, you should use lerp instead of just setting the position every frame. Also, if it is in edit mode it may not look as smooth as it would be in preview/publish mode.

GitHub: https://github.com/Gausroth/HorizonWorldsTutorials.git Discord: https://discord.gg/hNyDQwdw4N YouTube: https://www.youtube.com/@GausRothTutorials

3 replies

SeeingBlue
Honored Contributor
September 3, 2025

Might have to share your movement code, it shouldn't be lagging with onUpdate and local scripting.

Upcoming Events : Performance Pro - UI Unleashed - Building Responsive & Performant Interfaces Thursday June 19th 5:00 PM PT - Register June Programming Calendar
gausroth
gausrothAnswer
Honored Contributor
September 3, 2025

If you want smooth movement, you should use lerp instead of just setting the position every frame. Also, if it is in edit mode it may not look as smooth as it would be in preview/publish mode.

GitHub: https://github.com/Gausroth/HorizonWorldsTutorials.git Discord: https://discord.gg/hNyDQwdw4N YouTube: https://www.youtube.com/@GausRothTutorials
Navid64Author
Up and Coming
September 4, 2025

Thank you, SeeingBlue​ and gausroth​ . It was my mistake - I was testing in the editor.