so when I hold my tool it works just fine with the weld script. But when buy the tool from the shop the weld breaks and it scatters everywhere. Plz help me.
my weld script:
local prev local parts = script.Parent:GetChildren() for i = 1,#parts do if (parts[i].className == "Part" or parts[i].className == "UnionOperation") then if (prev ~= nil)then local weld = Instance.new("Weld") weld.Part0 = prev weld.Part1 = parts[i] weld.C0 = prev.CFrame:inverse() weld.C1 = parts[i].CFrame:inverse() weld.Parent = prev end prev = parts[i] end end
my shop script:
local player = game.Players.LocalPlayer script.Parent.MouseButton1Down:Connect(function() if player.leaderstats.Cash.Value >= 60 then player.leaderstats.Cash.Value = player.leaderstats.Cash.value - 10 game.ReplicatedStorage.Weapons.SithSaber:Clone().Parent = player:WaitForChild("Backpack") end end)