How can I move this to the right instead of being in front of the character?

Hi, title is pretty self explanatory, I just had a question about positioning, since I’m initially positioning an object to be to the right of the character, yet its appearing in front.

Please keep in mind I have a loop running to make it orbit around the character constantly, but I initially position it to be to the right however it only positions to the front.

image

What I want:
image

Initial position:

local radius = 8
local constantHeight = 1.5
	
maxopBlue.CFrame = character.HumanoidRootPart.CFrame * CFrame.new(radius, constantHeight, 0)

Code in loop to orbit:

local CircleModule = {}

function CircleModule.getXY(angle, radius)
	return (math.sin(angle) * radius), (math.cos(angle) * radius)
end

return CircleModule
for i = 0, 720, 6 do
		local angle = math.rad(i)
		
		local x,z = circleModule.getXY(angle, radius)
		
		maxopBlue.CFrame = fixedPos * CFrame.new(-x, constantHeight, -z)
		
		task.wait()
	end

just add 90 to the angle

360 degrees in a circle so 90 would go from front to side

local angle = math.rad(i+90)
1 Like

Thanks a lot, I don’t know why I didn’t think of this at all lol

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.