The title says everything, i would fire remotes but obviously that is very exploitable, trying to do the least exploitable way
You can’t really* detect it without remotes.
*Really as in, it might be possible but I don’t know that method.
The reasoning i want to detect if the user is aiming on the server is to modify the spread so its less when the player is aiming, i dont want it to be exploitable and always have low spread for hackers due to infinitely firing the aim remote
Tell the Server to create a Value, and with that Value, use the Client to check whether they are aiming or not, create this value somewhere like on the Player so its accessible to both Client and Server.
Perform Sanity Checks if Validate the Information on the Server, and if true, apply said data to the Server.
For everything in your game, its up to you to make sure they cant be exploited, which is why we add Sanity Checks to the Server, and RemoteEvents to ensure what the Client is giving us, is true.
How are you supposed to do sanity checks on somethings thats done on the client with userinputservice
Only use the client to get a player’s inputs. Use remote events and send every input into a serverscript that then determines if the player can do the action (ex; fire, aim, reload). If you do this, the player will only be able to aim when the serverscript lets them, which would mean you can check if the player is aiming without worrying about an exploiter falsifying that information.
fire the remote to the server, then what? the server cant do a check for aiming and do something like
remote.clientevent()
if inputserv:mouse2isdown then
aim work no fake
else
naughty hax
end
I think you are misunderstanding, the player should not be able to aim via the local script as this is exploitable. Instead, what you should do is create a ServerScript that will make the player aim and use a LocalScript to get the player’s inputs. Using RemoteEvents and logic checks in the ServerScript, your player will not be able to aim outside of the conditions you give them. Now, since players can only aim when allowed you should be able to safely check whether they are aiming since the aiming occurs on the ServerScript. I have a scripts that do something similar, I can post those if needed.