So i want to make like a mill for a task but it does not break and falls … what can I do?
local weldedParts = {}
function Weld(x, y)
local weld = Instance.new("Weld")
weld.Part0 = x
weld.Part1 = y
local CJ = CFrame.new(x.Position)
weld.C0 = x.CFrame:inverse() * CJ
weld.C1 = y.CFrame:inverse() * CJ
weld.Parent = x
table.insert(weldedParts,y)
end
function RotateV(x,y, c0, c1)
local W = Instance.new("RotateV")
W.Part0 = x
W.Part1 = y
W.C0 = c0
W.C1 = c1
W.Parent = x
return W
end
function WeldRec(instance)
local childs = instance:GetChildren()
for _,v in pairs(childs) do
if v:IsA("BasePart") then
Weld(script.Parent.Center, v)
end
WeldRec(v)
end
end--
WeldRec(script.Parent)
RotateV(script.Parent.Center,script.Parent.Center, CFrame.new(), CFrame.new(0,0,15.5) * CFrame.Angles(math.rad(-10),0,0))
for _,v in pairs(weldedParts) do
if v:IsA("BasePart") then
v.Anchored = false
end
end