Why doesn't this crafting script work?

I’m trying to put together my own crafting system. I’ve got the code together (based on this video: How to make a Crafting System in Roblox Studio | Arro - YouTube), but for some reason it doesn’t work. I added a print("Crafting") to see if anything wasn’t working. The button press was working, but for some reason, it completely ignored the code. I tried adding the required items into the StarterPack, and it worked, but it broke the resulting tool. Help?

Code:

local ItemStorage = game.ReplicatedStorage.Items -- general setup
local Player = game.Players.LocalPlayer
local BackPack = Player.Backpack

local ItemResult = ItemStorage.Clothing:WaitForChild("MilitaryHelmetWCover") -- items setup
local ItemOne = BackPack:FindFirstChild("WoodlandHelmetCover")
local ItemTwo = BackPack:FindFirstChild("MilitaryHelmet")


local function craftPressed()
	print("Crafting")
	if ItemOne then
		if ItemTwo then
			ItemTwo:Destroy()
			ItemOne:Destroy()
			local GivenResult = ItemResult:Clone()
			GivenResult.Parent = BackPack
		end
	end
end


script.Parent.Parent.MilHelmWoodCover.MouseButton1Click:Connect(craftPressed)

You should probably move these variables into the craftPressed function. With your code, it only looks for those items when the script loads in, NOT when the button is pressed.

Well that fixed the first problem, but I’m not sure why it seems to break the item when it’s being given.

Others on the video’s comments have said it has broken their tools as well, including swords.

That must just be issues with the tool itself, this script seems fine.

I tried changing it to GivenResult.Parent = Player.Backpack and it still seemed to break. I changed the result to a weapon, but it still broke.

It is most likely due to the scripts inside of the tool.

Tried the same thing with a default roblox sword. I think the script’s just broken.