if Scale.Config.VisualDistanceUnit.Value ~= "Light Years" then
Billboard.Main.SurfaceGui.MilesFromSun.Text = "(approx. "..FormatNumber(Scale.GetVisualUnit(StudsFromTheSun)).." "..Scale.Config.VisualDistanceUnit.Value.." from the Sun)"
Billboard.Main.SurfaceGui.MilesFromEarth.Text = "(approx. "..FormatNumber(Scale.GetVisualUnit(StudsFromTheEarth)).." "..Scale.Config.VisualDistanceUnit.Value.." from the Earth)"
Billboard.Main.SurfaceGui.MilesFromPrimaryBody.Text = "(approx. "..FormatNumber(Scale.GetVisualUnit(BodyMobilizer.Distance)).." "..Scale.Config.VisualDistanceUnit.Value.." from Primary Body)"
else
Billboard.Main.SurfaceGui.MilesFromSun.Text = "(approx. "..Scale.GetVisualUnit(StudsFromTheSun).." "..Scale.Config.VisualDistanceUnit.Value.." from the Sun)"
Billboard.Main.SurfaceGui.MilesFromEarth.Text = "(approx. "..Scale.GetVisualUnit(StudsFromTheEarth).." "..Scale.Config.VisualDistanceUnit.Value.." from the Earth)"
Billboard.Main.SurfaceGui.MilesFromPrimaryBody.Text = "(approx. "..Scale.GetVisualUnit(BodyMobilizer.Distance).." "..Scale.Config.VisualDistanceUnit.Value.." from Primary Body)"
end
Billboard.Main.SurfaceGui.OrbitProgress.Text = "(Orbital Progress: "..OrbitPercentage.."%)"
Billboard.Main.SurfaceGui.OrbitCount.Text = "# of Orbits In Simulation: "..FormatNumber(Body.OrbitsSinceSimulationBegan)
Billboard.Main.SurfaceGui.RotationCount.Text = "# of Rotations in Simulation: "..FormatNumber(TotalRotations)
Billboard.Main.SurfaceGui.RotationProgress.Text = "(Rotational Progress: "..RotationPercentage.."%)"
Billboard.Main.SurfaceGui.StudsFromSun.Text = StudsFromTheSun.." Studs from the Sun"
Billboard.Main.SurfaceGui.StudsFromPrimaryBody.Text = BodyMobilizer.Distance.." Studs from Primary Body"
Billboard.Main.SurfaceGui.StudsFromEarth.Text = StudsFromTheEarth.." Studs from the Earth"
For my Solar System Model I am working on bits by bits, I have billboards for each celestial body that updates every frame information about it and it’s position in the simulation. If this becomes any more than like 10 SurfaceGui
s it becomes an issue and framerates drop extremely low.
(The provided code runs every RunService.Stepped
alongside all of the code responsible for updating the celestial body’s position).
Things I’ve tried:
- Removing the
FormatNumber()
method.
Things I will not settle for:
- Updating it less frequently.
That’s why I’m asking if there is a solution to this!