How to detect when the server last replicated CFrames?

I am currently working on a physics based custom character controller. I don’t want to use humanoids for many reasons mostly tied to physics, so I won’t reply to questions regarding that.

The way I have it now, every player is the network owner of a part named Root. That part is the same as the HumanoidRootPart in default characters and the rest of the model is generated and handled locally. I’m working on a simple bad network compensation which offsets the visible portion of the model depending on their current velocity. It works fine in play solo, but causes issues when the CFrames are replicated between frames, making the model move further than it should.

In short, I need a way to find the exact last moment the server replicated CFrames to the client. It can be hacky and I just want it to work without breaking in the foreseeable future.

1 Like

5 posts were merged out for being off-topic

That isn’t an answer to my question.

I don’t need a function to return the current system’s time (I could just use tick for that), I want to know whether a replication happened between 2 RunService heartbeats and when it happened. I made a temporary solution with a part that moves up and down on the server which gets replicated to all other clients, so I just check if its position changed. This is only a partial solution as characters still end up slightly stuttering back and forth as I can only detect whether it happened, not when it happened.

1 Like

It’s pretty much the same as normal, @Eternalove_fan32 that won’t work.

local lastTick
lastTick = tick()
1 Like

Unfortunately there is no event for listening to when exactly physics properties replicate, nor do you have control over the exact replication rate of physics. You will have to find a different solution for this problem.

If the Root parts are unanchored and the network owner sets the position and velocity of the part constantly, I don’t think you’ll have to worry about handling network details of physics. I think the engine will handle that all for you, and it’s probably going to be messy doing your own prediction on top of physics logic already applied to replicated unanchored parts.