Authoritarian server model for a locally controlled constraint Vehicle

In the future, I’m planning to make a constraint vehicle using, well Constraints and AlignOrientation to mimic tank controls for a mech like so below:

https://i.imgur.com/YCkHrka.mp4

However, the issue is that it’s all being controlled locally which leaves it very vulnerable to exploiters based on what I have read. Consequently, now I’m trying to brainstorm ideas to make this local vehicle fit the authoritarian server model while still giving the player the responsiveness feel.

TL;DR: My plan is

  • Create a server copy of the vehicle thing that is invisible to the player but is what all players see

  • Make the server and client communicate to each other through remotes, and if the server-side physics disagrees with the client it makes the client tween towards the server’s position.

Now i’m wondering if all of this is necessary or that I’m overcomplicating things to mimic vehicles locally like in armored patrol, which I haven’t seen an exploiter in yet.

https://www.roblox.com/games/1340132428/Armored-Patrol-v9-5-FIXING-SERVER-LOADING-ISSUE?refPageId=f64e46e8-fc33-4f43-9c74-c8efb4ea567b#

Adding RemoteEvent/RemoteFunction into the equation is just another avenue for an exploiter to, well, exploit. Your best bet is to do server-side sanity checks on the vehicles position to make sure it’s not doing anything out of the ordinary (going through important walls, spinning uncontrollably, hovering, etc).

Determining what is “out of the ordinary” is, and always has been, kinda tough to solve, and ultimately different for every game.

1 Like

Hmm, if it’s just a server to client remote event would it be fine?

Roblox already does a lot of work in the background to ensure stuff looks smooth for all clients, so it’s probably best to stray away from doing your own thing here. Setting the network ownership of the vehicle to whoever is sitting in it should be fine here (in fact, I think the engine does this for you already).

There’s not much in ways of replication tools available to you when it comes to creating stuff that everyone except the driver can see. Something will be choppy, especially if you have multiple people sitting in the same vehicle.

1 Like