Advertisement
oopsrainbow4

Unit Circle

Jul 29th, 2022
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.34 KB | None | 0 0
  1. local part = script.Parent
  2. local RunService = game:GetService("RunService")
  3.  
  4. local degree = 0
  5. while RunService.Heartbeat:Wait() do
  6.     degree += 1
  7.    
  8.     local x = 15 * math.cos(math.rad(degree))
  9.     local y = 15 * math.sin(math.rad(degree)) + 20
  10.     local z = 1 (or degree / 10 [if you want part moving])
  11.    
  12.     part.Position = Vector3.new(x,y,z)
  13. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement