Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How could I do a sanity check for mouse.Hit.Position?

Asked by 4 years ago

I will just throw an example rather than copying my code, because it is more just brainstorming on how I would go about this anyway.

-- Client
local pos = game.Players.PlayerName.Character.Head.Position
remote:FireServer(pos)

-- Server
remote.OnServerEvent:Connect(function(player, pos)

-- some sort of sanity check here, to make sure they aren't firing through player's heads
end)

I thought about checking if the pos was a player's head position, but that could be slightly off b/c of lag. My other idea was checking if they are sending through the same exact value, but again, if a player is moving that wouldn't matter. I am just stuck and not sure what to do, since aimbotting would be quite the issue for my gun game. Any ideas will be appreciated!

1 answer

Log in to vote
0
Answered by 3 years ago

There currently is no easy solution as exploiters could still rig the passed argument. However, one possible way to detect aimbotting is if the player is shooting rays at fast turn speeds.

Ad

Answer this question