How to Create a Solar System on Roblox By Tomroblox54321
In this tutorial I’m going to be show you how to make a simple or advanced Solar System on Roblox.
Note: For this tutorial it is recommended that you use my module [V2]Tomroblox54321’s Advanced Planetary Orbit Module or @daftcube’s module OrbitLib: Space Flight Dynamics for Roblox Lua. Mine is for easy yet moderately advanced orbits and @daftcube’s module is good for advanced but harder to set up.
For this tutorial I’m going to be using module for the scripts and examples. But do check out OrbitLib.
By the end of this you can create a solar system like this : Tomroblox54321’s Planetary Orbit Module. - YouTube
Setting up the Planets
So make what planets you want to have in the solar system and customize them. Something like this is great:
For this we have the Sun, Mercury, Venus, Earth, Moon, Mars, Jupiter, Saturn, Uranus, Neptune and Pluto.
I do recommend making the planets neon and making trails for the planet.
Scripting the Solar System
First get my module here : Tomroblox54321’s Advanced Planetary Orbit Module.
Get the module and import it into ServerScriptService.
Next make a script for for one of your orbiting planets and type something like this into it.
local OrbitModule = require(game:GetService("ServerScriptService").OrbitModule)
local Sun = game.Workspace.Sun
local Earth = game.Workspace.Earth
local NewOrbit = OrbitModule:CircularOrbit(
Earth,--Planet orbiting
Sun,--Planet getting orbited
10--Time to make a full orbit
)
If you want elliptical, eccentric or more advanced eccentric orbits, check my documentation on my module for more info!
Next for the moon make a script like this:
local OrbitModule = require(game:GetService("ServerScriptService").OrbitModule)
local Moon = game.Workspace.Moon
local Earth = game.Workspace.Earth
local NewOrbit = OrbitModule:CircularOrbit(
Moon,--Planet orbiting
Earth,--Planet getting orbited
1--Time to make a full orbit
)
Then duplicate that script and change the parameters and planets to your chosen planets.
Now run it all and watch it go. It should now look like this!
And that’s it that’s how you make your own Solar System in Roblox Studio.
Hope you enjoyed this tutorial!
Tomroblox54321