Im making a cannon that can run out of bombs i have the amount of bombs in an int value but the value never changes when you fire
local button = script.Parent
local ExplosionOutOfBarrel = script.Parent.Parent.Partofexplode.Explosion
local ExplosionSoundOutofThebarrel = script.Parent.Parent.Partofexplode.ExplosionSound
local ExplodsionLight = script.Parent.Parent.Partofexplode.ExplosionLight
local SmokeyBoi = script.Parent.Parent.Partofexplode.Smoke
local AmountOfBombsleft = script.Parent.AmountOfBombs.Value
local GuiOfBombs = game.StarterGui.ScreenGui.ShowBombs
local Xplode1 = script.Parent.Parent.ExplosionPart1.Explosion1
local Xplode2 = script.Parent.Parent.ExplosionPart2.Explosion2
local PartThatOofs = script.Parent.Parent.PartThatGoesBoom
local function BombGoOff()
ExplosionSoundOutofThebarrel:Play()
Xplode1.Visible = true
PartThatOofs.Transparency = 1
PartThatOofs.CanCollide = false
end
script.Parent.ClickDetector.MouseClick:Connect(function()
BombGoOff()
AmountOfBombsleft.Value = AmountOfBombsleft.Value - 1
end)

3 comments
Sadly he can't accept your answer because of his negative reputation.
I'll accept that for you.
c :