Universal Script πŸ“Œ
34.1k Views
255 Executions

Orbit Players Script

Universal Script πŸ“Œ
lopsidedA
lopsidedAFirst script
5 years ago
Get an executor
Please login to perform these actions:

Does it work?

No reports yet

No reports yet. Tried it? Be the first to say.

Also noticed:

Description

-Can set speed of orbit -Can set radius of orbit (orbit size) -Can set eclipse of orbit (orbit width)

Updates

  1. Script edited: Create script

View Raw
---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)



Comments

0
Log in to join the conversation. Login
No comments yet. Be the first!

Tags

More universal scripts

See all
Script hub
33.0k
298.1k
Bumped 27 minutes ago
Script hub
23.6k
5.2k
Bumped 27 minutes ago
Key System
Paid
High QualityΒ Offering
Universal Script πŸ“Œ
174
527
Bumped 56 minutes ago
Universal Script πŸ“Œ
1.6k
30.2k
Bumped 58 minutes ago
Script hub
4.1M
558.5k
Bumped 1 hour ago
Key System

Script hub

Hall of Fame #3

Verified script badgeOverflow 35 Supported Games

Script hub
5.5k
28.9k
Bumped 2 hours ago
Key System
Script hub
14.0k
28.5k
Bumped 3 hours ago