Character position lagging between Server and Client is too high

I want to make proper Anti-cheat, so I made a script that checks the position of characters.

But I noticed its problem even if it has low pings, Character position lagging between Server and Client is too high before few days.

Like this:
image
The difference is almost 3~4 studs.
and i made this script to security my game:
image


The hitbox isn’t too precise.
(It’s same in the ROBLOX)
How to fix it safely against hacking?