#i want a part to move in circles

20 messages · Page 1 of 1 (latest)

olive egret
#

will i have to use trigno to do it or is there a simpler way this is the current code

wait()
local ts = game:GetService("TweenService")
local b = script.Parent
local cam = game.Workspace.CurrentCamera
local cc = game.Workspace.TestCam
local info = TweenInfo.new(5,Enum.EasingStyle.Linear,Enum.EasingDirection.In,-1,true,0)
local properties = {CFrame = CFrame.new(-4, 6, 38)}
local tween = ts:Create(cc,info,properties)
cam.CameraType = Enum.CameraType.Scriptable
wait()
b.Activated:Connect(function()
    tween:Play()
    cc:GetPropertyChangedSignal("CFrame"):Connect(function()
        cam.CFrame = cc.CFrame
        tween:Play()
    end)
end)
rapid egret
olive egret
faint sage
#

Make sure to change the radius variable and yOffset variable to your liking. Also make sure to have a part named ‘FocusPart’ in workspace, this will be the part the camera rotates around

#

@olive egret

rapid egret
#

could use RunService there
also os.clock() is better grrrr

rapid egret
#

because it is

faint sage
#

tick() gives a float that can be used just as well as os.clock() and its not like its different performing. Tbh i don’t really know too much about os.clock() and i usually use tick() so thats why i used it.

faint sage
rapid egret
faint sage
#

About precision

rapid egret
#

we dont need the unix epoch here, and we also dont care about time zones and that stuff

faint sage
#

Its just a number thats incrementing that we need

rapid egret
# faint sage Doesnt really matter

i mean.. yes
idk how roblox handles it internally but now with that new fps unlock feature
idk if tick() is really that good at handling 240fps
but the cpu clock handles that ez (otherwise it cant run roblox... or windows... or anything else)

faint sage
#

i said precision didn’t matter not perfomance

rapid egret
#

but if tick updates at 60hz then you also move your camera at 60hz
even with 240fps