Brick Launcher randomly doesn't work

Hey there! I’m currently working on a game in which you shoot people with bricks. My brick gun was working fine until we updating the game, all we did was change the color of some bricks for a winter update. I honestly do not know what’s wrong, any help is appreciated.

Screenshot_8

-- GunScript

local tool = script.Parent

local handle = tool:WaitForChild("Handle")
local barrel = tool.Barrel

local cas = game:GetService("ContextActionService") -- Get service
local rs = game:GetService("ReplicatedStorage")

local shooting = false
local waiting = false
local holding = script.Parent.Holding

local player = game.Players.LocalPlayer
local mouse = player:GetMouse()

------------------------------------------------------------------

function shoot(actionName, inputState) 
	if inputState == Enum.UserInputState.Begin then
		shooting = true
	end

	if inputState == Enum.UserInputState.End then
		shooting = false
	end
end

------------------------------------------------------------------

function bullet()
	if not waiting then
		waiting = true
		rs:WaitForChild("GunEvent"):FireServer(tool, barrel.Position, mouse.Hit.p)
		wait(math.random(0.01,0.1))
		waiting = false
	end
end

------------------------------Welding------------------------------
function weld()
	for _,v in pairs (tool:GetDescendants()) do
		if v:IsA("BasePart") then
			local wc = Instance.new("WeldConstraint", handle)
			wc.Part0 = handle
			wc.Part1 = v

			v.Anchored = false
			v.CanCollide = false
		end
	end
end

weld()
------------------------------------------------------------------
-- mobile
cas:BindAction("ShootWeapon",shoot, true, Enum.UserInputType.MouseButton1, Enum.UserInputType.Gamepad1) -- Allow all control schemes


-- ending 
game:GetService("RunService").RenderStepped:Connect(function ()
	if shooting == true and holding.Value == true then
		bullet()

	end
end)

you should not do a model in a tool maybe parent the baseparts to the tool

Revert the update and recolor the bricks, if it’s just a simple case of an update gone wrong.

I don’t think the update has anything to do with it as we had trouble with the gun randomly not working at times until you reset, now it’s just not working at all.