So I have been making a custom load out system in which you can put different types of attachments on your gun and stuff. It works perfectly fine but if you customize one gun and try to do it again it does not do anything at all. I have put prints through the script and it all of them prints but when I check the gun to see if the scope cloned to the gun there is nothing there. But it only has this problem if you try to customize a gun twice.
Here is the scrip it runs once the remote event is called which is called when a button is pressed
local sniperScopeMount = game.ReplicatedStorage.Sights:WaitForChild("SniperScope"):Clone() addSniperScope.OnServerEvent:Connect(function(player) print("Fired") local attachPart = workspace.AssaultRifle:WaitForChild("sniperMount") --There is a button that clones a assault rifle to the workspace local weld3 = Instance.new("WeldConstraint") print("Weld made") sniperScopeMount.PrimaryPart = sniperScopeMount.Base sniperScopeMount.Parent = game.Workspace:FindFirstChild("AssaultRifle") sniperScopeMount:SetPrimaryPartCFrame(attachPart.CFrame) print("Primary parts set") weld3.Part0 = sniperScopeMount.PrimaryPart weld3.Part1 = attachPart weld3.Parent = sniperScopeMount.PrimaryPart print("Welds Set") end)