Is there a safe way to tween kill parts on the client?

Hi! I’m making a competitive game where players have to dodge moving kill parts. Normally I would just do this on the client if it was something like an obby, but I’m a little worried about exploiters.

I’ve seen people do all of the movement math on the server, but my kill parts are odd shapes (circles, meshes, etc), and I’d rather not have to write a collision system.

Does anyone have any tips on how to keep the kill parts moving smoothly on the client without giving laggy players an advantage, and without leaving the door open for exploiters? Thanks!

1 Like

Would you not be able to handle the actual movement of them on server then collisions on client?

That’s the opposite of what I’m trying to do, since moving it on the server would look laggy for players, and checking the collisions on the client would let exploiters easily bypass it.

If you’re using manual interpolation for the parts, you could create a fake part on the client and try to keep it in-sync using workspace:GetServerTimeNow().

It won’t be perfectly smooth (might slow down due to drift sometimes), but it’ll give the illusion of responsiveness while also keeping collisions on the server.

I’m a little confused, are you saying would I have an invisible part on the server that also gets moved?

Either way, an exploiter can delete the kill brick, and prevent .Touched from firing. Since characters are client sided, the physics is controlled by the client including the .Touched signal being replicated to the server

If the kill brick is unanchored, and is owned by the server, then I think .Touched will fire even if the exploiter prevents it from firing, as the kill brick itself will fire .Touched as well. I think you can also trick anchored parts into firing .Touched events if you put a TouchInterest (or whatever it is) inside of them, I don’t know how reliable that will be though. You can test these things out by going into play test, and destroying the kill brick from the client view

If you want to stop exploiters, you’ll have to handle collisions on the server, with the technique mentioned, or the WorldRoot api. But then exploiters can fly and skip your kill brick, …

And you can always make the animation smooth on the client, while doing collisions on the server

The best solution would be a server authoritative character controller (which roblox is working on) or a server sided anticheat to catch flying exploits and whatnot, which will never be perfect (and could get false positives)

Here’s an example of what I mean. You would have an invisible part on the server that the server uses for collisions while the client updates a visual copy that predicts where it currently is on the server. This makes the movement seem smooth while also having collisions handled entirely by the server.

GetServerTimeNow Sync Example.rbxm (4.5 KB)

This is what I was thinking of doing, my only problem is that if someone has high ping, it will look they are phasing through parts for other players.

1 Like

This could work, but wouldn’t having multiple of these cause lag, even if they are invisible?

Yeah, you may have to keep the server version in a separate un-replicated container to avoid useless replications, which is why this setup is a bit awkward.

Another reason Roblox should have selective instance replication!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.