So I want a few objects so circle the main object just like stars do.
local Part = script.Parent local render = game:GetService("RunService") local commet = game.Workspace.astroids while render.RenderStepped:wait() do for i,v in pairs(commet:GetChildren()) do local magnitude = (Part.Position - v.Position).magnitude local F = (Part:GetMass() * v:GetMass()) / math.pow(magnitude , 2) v.Velocity = Vector3.new(F,F,F) end end
As far as I can see my calcualation is not wrong exept for that I do not multeply my equation with G in the end.
You can see what I am trying to do in this video: https://youtu.be/Ouu3D_VHx9o
https://youtu.be/HEJ_UtSbinY