So the script i made inserts welds into the model to the torso. but all the parts go inside each other. i want them to retain their position. help?
local plan = workspace.PlanarTheorem
local plr = game.Players.LocalPlayer
script.Parent.Touched:connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
for i, prt in pairs(hit.Parent:GetChildren()) do -- Hats
if prt:IsA("Hat") then
prt.Handle.Transparency = 1
elseif prt:IsA("Part") then
prt.Transparency = 1
end
local cactus = script.Parent.Parent.Cactus:Clone()
cactus.Parent = hit.Parent
cactus:SetPrimaryPartCFrame(hit.Parent.Torso.CFrame)
for i, piece in pairs(cactus:GetChildren()) do
local weld = Instance.new("Weld",piece)
weld.Part0 = piece
weld.Part1 = hit.Parent.Torso
piece.Anchored = false
end
end
end
end)
<3 cats <3 |