I was gonna make a reload script But I thought "Why Shouldn't I test it first" so I made my ammo checker but the problem was My ammo checker did not work
this is ammo checker
while true do
if Ammo < 0 then
CanFire = false
else
CanFire = true
end
wait()
end
you can see if the ammo is 0 or Below 0 its making CanFire False
if you want you can see the other lines that I use CanFire
--Shooting The Gun
local function fire()
if CanFire == true then
local ray = Ray.new(tool.Barrel.CFrame.p, (mouse.Hit.p - tool.Barrel.CFrame.p).unit * Range)
script.Parent.Remotes.Shoot:FireServer(tool, ray)
end
--AutoFire
mouse.Button1Down:connect(function()
button1down = true
repeat fire() wait(0.199) until
button1down == false
CanFire = false

2 comments
if Ammo <= 0 ??
only works when I drop and pick it up again