Moving an Object around another object

How would I move one block around another block from a script. For example, there is one block in the center and another block orbiting it. I know you can use SBS plugin to do that from studio but I want to do it from a script.

If they’re both going to be rotating at the same time in the same direction, you could weld the orbiting part to the main part(they don’t need to be touching), and then when the main part rotates, so will the other one.
Or, you could create an invisible part inside the main one and weld the orbiting part to it, then do something like

local invisPart = workspace.InvisiblePart
local mainPart = workspace.MainPart

local function Heartbeat()
        invisPart.Position = mainPart.Position --Moves the invisible part to the main part
        invisPart.Orientation = invisPart.Orientation +,1,0) --Increase the middle number to rotate/orbit faster or make it negative to rotate the other way

in a script.