I'm creating an airline meal, on a small tray.
Picture: http://prntscr.com/amkyb5
All the parts in it, including the Union are on Unanchored, and I have welds in every part. Here are the 4 weld scripts.
local w1 = Instance.new("Weld")
w1.Parent = script.Parent.Handle
w1.Part0 = w1.Parent
w1.Part1 = script.Parent.Handle2
w1.C1 = CFrame.new(3, 0, 0)
function Weld(x,y)
local W = Instance.new("Weld")
W.Part0 = x
W.Part1 = y
local CJ = CFrame.new(x.Position)
local C0 = x.CFrame:inverse()*CJ
local C1 = y.CFrame:inverse()*CJ
W.C0 = C0
W.C1 = C1
W.Parent = x
end
function Get(A)
if A.className == "Part" then
Weld(script.Parent.Handle, A)
A.Anchored = false
else
local C = A:GetChildren()
for i=1, #C do
Get(C[i])
end
end
end
function Finale()
Get(script.Parent)
end
script.Parent.Equipped:connect(Finale)
script.Parent.Unequipped:connect(Finale)
Finale()
local w1 = Instance.new("Weld")
w1.Parent = script.Parent.Handle
w1.Part0 = w1.Parent
w1.Part1 = script.Parent.Handle2
w1.C1 = CFrame.new(3, 0, 0)
function Weld(x,y)
local W = Instance.new("Weld")
W.Part0 = x
W.Part1 = y
local CJ = CFrame.new(x.Position)
local C0 = x.CFrame:inverse()*CJ
local C1 = y.CFrame:inverse()*CJ
W.C0 = C0
W.C1 = C1
W.Parent = x
end
function Get(A)
if A.className == "Part" then
Weld(script.Parent.Handle, A)
A.Anchored = false
else
local C = A:GetChildren()
for i=1, #C do
Get(C[i])
end
end
end
function Finale()
Get(script.Parent)
end
script.Parent.Equipped:connect(Finale)
script.Parent.Unequipped:connect(Finale)
Finale()
The hold position is this: http://prntscr.com/amkz8f
Which SHOULD look like this (before I edited the whole thing)
Please help! Cheers!
