So, I have an automatic gun, and every time it fires a bullet it sends a RemoteEvent to fire the bullet. Thing is, it fires pretty slow, and I can fire faster on semi. How would I lessen the delay?
I have it set to 0 because I want it to be as fast as possible, but it doesn't seem to care.
--Code fragment. mouse.Button1Down:Connect(function() if automaticFire and cooldown == false then mouseDown = true while mouseDown and automaticFire do if scriptLoaded > 0 and lowered == false then if fireRate > 0 then cooldown = true end scriptLoaded = scriptLoaded - 1 player.PlayerGui.ammoDisplay.Frame.ammo.Text = scriptLoaded .. "/" .. scriptUnloaded fireBullet() cooldown = false else mouseDown = false local emptyChamber = Instance.new("Sound") emptyChamber.Parent = tool.firePart emptyChamber.SoundId = "http://www.roblox.com/asset/?id=" .. gunEmpty emptyChamber:Play() wait(1) emptyChamber:Destroy() end end end