When I change the position it sends the object to the center of the world

I am making a attack for a boss, where his staff spins around him.

local staffmodel= script.Parent.Parent
local speed = 0.00001
local distanceFromCenter = 20
local center = Vector3.new(script.Parent.Parent.Parent.Pharo.Stand.Position) -- this sends it to 0,0,0 and i have no clue why
local function movearoundboss()
	for i = 0, 360 do
		staffmodel:PivotTo(CFrame.new(center) * CFrame.Angles(0,math.rad(i),0) * CFrame.new(0,0,distanceFromCenter))
		staffmodel:PivotTo(monster:GetPivot() * CFrame.Angles(0,math.rad(-90),0))		
while wait(0.5) do

when I try and change it so the center is the boss, it sends it to 0,0,0

Is this a Vector3? You’re creating a Vector3 by passing a Vector3 to the constructor.

1 Like

Position is a Vector3, so for the center variable, you can remove the Vector3.

1 Like

Thanks! It works, sorry I just checked off the first comment as the solution