I’m currently making a game that involves a weapon system that doesn’t use tools: It instead uses weapons that are attached to the players’ hands. When the players’ input scripts detect a click, they fire a remote event to a server script that handles weapon firing (obviously with a cooldown equal to the weapon’s fire rate).
This, in turn, causes a problem. There are certain weapons with quick fire rates (such as 0.2 seconds) that cause the remote event to fire repeatedly, causing latency. This combined with multiple players firing weapons at the same time causes a ton of latency on the players’ clients. My game also has other things that use remote events, but are not fired nearly as often (such as an EquipEvent for equipping tools from the inventory). I want to reduce latency on other clients, so I suppose I need to modify my weapon system in some way.
game.ReplicatedStorage.RemoteEvents.M1Event.OnServerEvent:Connect(function(player,weaponType,weaponName,holdTime)
I still want to keep the original functionality of the remote event, as it transfers lots of information from the original client input script.
What alternatives do I have to using the RemoteEvent? Right now, the game would be really hard to play with multiple people due to
Player appears to be spamming RemoteEvents.