Is there a way to get player's network ping safely?

I’m doing an anti-teleport cheat for a game. However, something really challenging about it is detecting “bad-wifi” players. They would be considered “exploiters,” since I am checking for their traveled position, and bad-internet players would kinda “tp” from place to place.

I know player:GetNetworkPing() exists, though it isn’t safe to send its value to the server, since exploiters could change it, as it is client-side. Any help is hugely appreciated! The game can’t have teleport exploits.

isnt it possible to use getnetworkping from the server

Yes, but are there any solutions to see if the player is having a lag spike rather than teleporting with an exploit?

a laggy player still goes the same speed on their side, so each time they teleport they would have to slow down/stand still to account for the extra distance, but a hacker doesnt have to slow down when they teleport

so you can check if total distance traveled over the last few seconds is greater than normal

Actually, I notice you can indeed get the NetworkPing server-side, why does it say it’s only available for the client?

It’s only available for the local player, if called from a client-side script.

You can technically fire remote event to client and see how fast it responds,
Althrough pretty sure it reinvents the wheel and there is already function for that.