Where should i place a remote event?

I have heard that if remote events get fired too much, they may cause some lag. So my question is:

Do i need to put the remote event on ReplicatedStorage and make it so when the gun fires, it fires the remote event?

Imagine 30 players firing their guns everytime, This won’t be good.

Or:

Do i just need to place the remote event on the gun and fire it from there?

What is the better way to do this?

Why would you need to fire an event every time a gun is fired?

So i can fire a ray from the gun to the mouse position and inflict damage to the hit.

1 Like

You don’t really need to be worried about 30 player firing a gun at once. So long as you are not firing a RemoteEvent every frame you should be fine.

Also, it doesn’t really matter where you put RemoteEvents so long as they are put somewhere Replicated to the player e.g. ReplicatedStorage, Player, Character, Tool, workspace.

Preferably ReplicatedStorage as it keeps things tidy and centralized.

1 Like