Every time I equip a weapon in my game, the ammo count goes down by 1 plus how ever many times I have equipped the weapon during the test. I can tell that is the pattern but I am not sure what to do about it.
script.Parent.Equipped:Connect(function(Mouse)
local function Reload()
Reloading = true
wait(1)
Ammo = MaxAmmo
Reloading = false
end
script.Parent.Activated:Connect(function()
if Ammo > 0 and not Reloading then
Ammo -= 1
print(Ammo)
script.Parent.GunShot:Play()
--recoils--
if Mouse.Target.Parent:FindFirstChild("Humanoid") then
script.Parent.DealDamage:FireServer(Mouse.Target.Parent, 20)
end
elseif Reloading == false then
Reload()
script.Parent.GunShot:Stop()
end

1 comment
That just takes away the count all together. Maybe there's a different keyword?