So Im making a Space tycoon Game. So now I made the earth orbit(move around the sun) the sun works perfectly can show the script:
-- Variables
local i = 0
local Speed = 0.004
local Object = game.Workspace.Earth
local Host = script.Parent
local Distance = 3650
-- Orbiting
while true do
wait()
i = i + 1
local Angle = script.Parent.Angle.Value
Object.CFrame = Host.CFrame - CFrame.fromEulerAnglesXYZ(Angle, i * Speed, 0) * Vector3.new(0, 0, Distance)
end
But I also Tried to make an orbit for my Tycoon but it didnt work.I can show you the code;
-- Variables
local i = 0
local Speed = 0.004
local Object = game.Workspace["Zednov's Tycoon Kit"]
local Host = script.Parent
local Distance = 3650
-- Orbiting
while true do
wait()
i = i + 1
local Angle = script.Parent.Angle.Value
Object.CFrame = Host.CFrame - CFrame.fromEulerAnglesXYZ(Angle, i * Speed, 0) * Vector3.new(0, 0, Distance)
end
The ["Zednovs Tycoon Kit"] thing in the script is making it not moving around the sun?

1 comment
Use BodyVelocity. None of your parts can be anchored. If you don't, the player will not be attach to the objects. I think if you're trying to accomplish something like this you shouldn't use a tycoon kit. You'll need to be welding every part to the base of the BodyVelocity.