So, I am making a soccer game, and basically I am setting the NetworkOwnership to the player. The problem with this is I don’t know how to make it secure to prevent exploiters. For example, an exploiter could just add a bodyVelocity that makes the ball go SUPER fast, or if they want to be “sneaky” they can increase some values by just a tiny amount.
I know with Network Ownership, there is not much you can do, however, I was just wondering what are some of the BARE MINIMUMS that I can do to keep my game a little safer.
My system right now currently sends a request to the server to gain network ownership, then the client just does all the physics.
local part = script.Parent
local networkowner = part:GetNetworkOwner()
if networkowner and networkowner.Name ~= "Whoever you want the owner to be." then
local player = game.Players:FindFirstChild("The network owner's name")
if player then
part:SetNetworkOwner(player)
else
warn("Network owner unavalible")
end
end
Well obviously I am doing some simple checks on server when they request for network ownership like distance checks, ping checks, but I feel like that is the most that I can do, I just don’t have any other ideas to make it secure.
Definitely server sided physics checks for the ball, by replicating the physics done on the client mathematically on the server plus leeway you can check if the ball is moving too fast or floating etc. If you check who currently has ownership of the ball you can then flag that player for messing with the ball, if you want it to be kept discrete just remove their ownership, don’t think something like rubber banding would work as it would affect other players.
Thanks, I can just do some simple checks like what you said just to make sure the ball isn’t moving too fast, isn’t too high, etc, also What do you mean by “rubber banding”?
Rubber banding means in this case anyway is where you move the ball back to its last position before being messed with but that would affect everyone as exploiters could abuse this to make it impossible to follow/hit the ball
Yeah, I will probably just make it so it flags the player in the console, nothing crazy like what you said, this isn’t supposed to be for a “public” game thing that I will publish but its supposed to be a competitive game league kind of thing so I won’t have to go crazy on the punishments, just make it easy to detect if someone is cheating
Yes it is sent by local script, if you want, I can send you the whole place file for game so you can see what my system is like (a little bit of an older version but the same idea)
Exploiters can infiltrate a local script to send the request. A serverside script is pretty much impossible to infiltrate on a regular exploit injector.
What are you suggesting that I should do? Sorry I am just a little confused, the client just sends a remote event to the server and the server will do some checks before it sets network ownership, the network ownership is handled on the server so yes they cant infiltrate that part like you are saying
Anyways, if you need to see what I mean, I sent a place file for it so you can look into it
Roblox by default gives the ownership of any unanchored part to the closest player but you should have a check to see if the player who currently has ownership is close enough to the ball if not then remove it. In the link you can see how when the character gets near the ball it becomes green highlighted automatically