I need help with making this automatic gun less buggy(what I mean by buggy is it may fire faster for a second then back to normal).
mouse.Button1Down:connect(function()
mouseDown = true
if auto then
while mouseDown do
wait()
if cooldown == false then
cooldown = true
fire()
wait(fireRate)
cooldown = false
end
end
else
if cooldown == false then
fire()
cooldown = true
wait(fireRate)
cooldown = false
end
end
end)
Thanks!

5 comments
It's not firing slower.. It's firing faster, or it shoots 2 at once...
Good Guy Here Take Up-vote and Gold ^_^ ????
emoji didnt send idk y
Thanks, I didn't know that RunService existed and I'm grateful you showed it to me. I also fixed the buggyness by making it a repeat until loop.
oh nice, I apologize for a late response