I’m trying to create bullet spread for my guns, but I’m not sure how I would do this securely. Basically I render the bullet on the client when u click and send that data to the server. How would I make sure both the server and client have the same angle for spread?
After some research I saw that when the client starts it requests a remote function that returns a table of pseudorandom numbers which get iterated through every time u fire a bullet. As well as making sure that the remote function can only be called once by each player would make it so the exploiter would need to read throughout you’re script to get an accurate number for each spread.
Or another option was to just send a pseudorandom number through the remote event each time u fire, which could result in exploiters sending dead accurate shots each time. I was thinking that I could maybe do some checks so that the client can’t send a number that was already used before and then invalidate the shot.
The last option was to just screw it and send the number through the remote event making sure that the same number wasn’t sent in a row, but if it’s spot on, it’s spot on.
What are u feelin?