I made this cube that spins around but when I try it, It cannot be anchored or else it won't spin, But when I unanchor it, it falls into the void, Can anyone help?
script:
for _, v in pairs(workspace.Cube:GetDescendants()) do
if v:IsA("BasePart") then
v.Anchored = false
local weld = Instance.new("WeldConstraint")
weld.Part0 = v
weld.Part1 = workspace.Cube.MainCube
weld.Parent = v
end
end
while true do
wait(5)
game.TweenService:Create(workspace.Cube.MainCube.BodyGyro, TweenInfo.new(5),{
CFrame = CFrame.new(workspace.Cube.MainCube.Position + Vector3.new(math.random(-1,1),math.random(-1,1),math.random(-1,1)), game.Workspace.Cube.MainCube.Position)
}):Play()
end

2 comments
How are you handing the spinning?
When you try to CFrame anything that's welded, the weld breaks. Don't weld it, hold it up using body forces. Also, when you weld two objects, the offset is NOT conserved the part1 takes the CFramr of part0 so you also have to set the offset manually.