Movement lag compensation

So I know how to get the player’s ping but I don’t know how I would go about making a movement lag compensation.

You see in my game there’s a script that freezes everyone by anchoring them but when it does the clients have different positions due to lag

I tried setting CFrame and position to the server and it didn’t work, any ideas that might help me out?

Why not make the server fire the client to freeze everyone? It would still be exploitable either way, as the player has network ownership of their character.

because it also has a server side effect on everything, parts, meshes, etc. It’s essentially a time stopping script

1 Like

Would freezing everything except players on the server and firing all clients to anchor work? Unsure of if this is the most optimal way or not, but it should work if you’re freezing the whole server.

I’ll try it later, cause I have to go but thanks. I’ll give feedback later

1 Like

Still not working cause it would just get the client’s position.

I think it’s because it’s anchored. cause when the anchor is released the model lags out for a split second

1 Like

Bumping this, does anyone have a potential fix for it?

You can send player’s position over remote from server and then anchor player in that specific position, you can also send tick() and based off calculations get the position yourself, but first one is probably the easiest one

Look up rollback netcode, its the best way to do lag compensation