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)

4 comments
Please validly use the code block as I cannot help you at all with your script all messed up like this.
ok
does this help?
So I'd assume that your cloning the tool on the client and the weld script is a server script so it won't run