Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Gun System won't reload clips?

https://gyazo.com/7b0745b93fc93c78a1f4cd9041ee8bff

https://gyazo.com/7816d616153e25658cf51715977bbbcc

Whats Wrong? When i reload, clip anim plays, but it wont add ammo

if Module.LimitedAmmoEnabled then

if Module.ShotgunEnabled == false then

local Magazine = 1

if Ammo > 0 then

Ammo = Ammo - Magazine

Mag = Module.AmmoPerMag

elseif Module.ShotgunEnabled == true then

local ammoToUse = math.min(Module.AmmoPerMag - Mag, Ammo)

print(ammoToUse)

Mag = Mag + ammoToUse

Ammo = Ammo - ammoToUse

end

end

else

Mag = Module.AmmoPerMag

end

It does not print anything, why?

2 comments

0

What is in the output?

0

mag is current ammo, ammo is current mags

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.