Help with machine gun

Trying to make a machine gun however I am stuck on a issue. If I’m going to make client to server communication using remote events, everytime the gun fires would I then send a request to the server to shoot? I think there is a limited amount of requests from client to server per minute using remote events, and being a machine gun it would fire around 1000 bullets and client to server requests per minute.

How would I get around this?

Also I’m struggling to make script it so that instead of just casting a ray from the gun and damaging the intersecting players that come in contact with the ray, I want to make a system where an actual bullet follows the path of the ray. How would I implement bullet drop with this as well?

Thanks heaps if you can get to me.

The RemoteEvent would simply queue up (I severely doubt you’ll hit this as it has to be within a few frames)

You should be more concerned with the security of your remote events, and you should implement sanity checks (whether the distance is ridiculous, whether the player even has enough ammo, etc) to prevent exploiters from killing the entire server.

As for bullet drop and bullet damage/ray casting, these articles may help you tremendously:

1 Like