Hello fellow programmers!
I have made a gun system for an upcoming SCP game.
The problem with it is that it has a short delay and
when you are firing an automatic gun there can
be lag causing the bullet count to go below zero.
Here is the footage of shooting the gun in studio (no lag):
Footage of shooting the gun in-game (laggy):
All of the visuals are handled on the client using :FireAllClients()
I visited a game that what I believe, handles the visuals in a similar
or even same way, and it has no delay at all.
The scripts for the system:
client.txt (5.5 KB)
server.txt (6.4 KB)
visuals.txt (7.7 KB)
Here is my game if you want to see for yourself:
https://www.roblox.com/games/7888605417/Gun-Test
If you know how to optimize the way my gun system is scripted please tell me.
Have a good rest of the day/night,
ExoticProto