Orbit Players Script
Key RequiredUniversal

Orbit Players Script

Universal ScriptlopsidedAlopsidedA 34K views 120 executesUpdated Apr 27, 2022
5.0/ 5(1 votes)
10100% Positive
Lua Script•23 lines (741 chars)
---by lopsidedAD    dwayne_johnson#8095

local player = game.Players.ENTERPLAYERNAMEHERE.Character.HumanoidRootPart --- enter players name there (do it)
local lpr = game.Players.LocalPlayer.Character.HumanoidRootPart


local speed = 8 
local radius = 8 --- orbit size
local eclipse = 1 --- width of orbit
local rotation = CFrame.Angles(0,0,0) --only works for unanchored parts (not localplayer)


local sin, cos = math.sin, math.cos
local rotspeed = math.pi*2/speed
eclipse = eclipse * radius
local runservice = game:GetService('RunService')


local rot = 0
game:GetService('RunService').Stepped:connect(function(t, dt)
rot = rot + dt * rotspeed
lpr.CFrame = rotation * CFrame.new(sin(rot)*eclipse, 0, cos(rot)*radius) + player.Position
end)

Features & Information

-Can set speed of orbit -Can set radius of orbit (orbit size) -Can set eclipse of orbit (orbit width)
#FE#roblox#orbit#universal#cool

Community Comments (0)

No comments yet for this script.

More Scripts for Universal Scripts