#make a part rotate around the player

16 messages · Page 1 of 1 (latest)

opal wing
#

you could use sine and cosine to constantly update a position around the player

#

although ill see if there is anything more optimal

rustic void
#

yes actually

#

I completelye forgot what the values were for

#

but there you have it

#

play around with it

#

and let me know how it went ^^

brittle cradle
#

Yes, here are two ways;

Using CFrames (.new() & .Angles)

and using math.sin and math.cos to move it around a circlular path

#

CFrame way tldr;

Part.CFrame = CFrame.new(OriginPosition) * CFrame.Angles( math.rad(ANGLE), 0 0) * CFrame.new(0, 0, OFFSET_DISTANCE)

#

( math.rad(ANGLE) may be in a different spot )

#

sin/cos way tldr;

local radius = 10

local x = radius * math.sin( tick() )
local z = radius * math.cos( tick() )

part.Position = OriginPosition + Vector3.new( x, 0, z )

rustic void
#

oh yea

#

that's just the time difference

brittle cradle
#

delta time, the time from the current heartbeat to the previous heartbeat

#

(the amount of time passed from one time point to another time point to be more generic)