Problem with rotation and size?

I am trying to make a building system, and the movement arrows work fine at certain degrees, but at others it completely breaks.

when it works, it looks like this:

but at other angles, this happens:
Screen Shot 2021-07-04 at 3.25.03 PM

as you can see in picture 2 the arrows are very far away from the part, some are also clipping into the part. this is the script that puts on the arrows (this script only puts on 1 arrow, too put on all 6 I just copy and paste and then change around some variables):
local Part = script.Parent

local Pos = Part.Position

local Size = Part.Size

local PosY = Pos.Y

local PosZ = Pos.Z

local Arrow ="Part")

Arrow.Parent = game.Workspace

local SizeX = Size.X * 1/2

Arrow.Anchored = true

local FinalPos = SizeX + Pos.X + 1

Arrow.Position =, PosY, PosZ)

Arrow.Size =, 0.5, 0.5)

anyone know how I can fix this? I am honestly out of ideas, thanks in advance.

Try to put this on while loop. Maybe put it on the coroutine so that it doesn’t delay/not executed other line.

the Arrow.Position is giving the arrow a position relative to the workspace, not to your part. so when you rotate the part, the position will stay the same since the size of the part hasnt changed

instead of setting Arrow.Position, try using Arrow.CFrame so that you can use :ToWorldSpace() to make both the orientation and position relative to the part’s orientation

like this: Arrow.CFrame = Part.CFrame:ToWorldSpace( + 1,0,0))

look at this for more info on cframes

Thanks, I will try this later today. Will mark as solution once I get home and try it out.

Sorry for reviving this dead post sanrio, but I still do not completely understand :ToWorldSpace, and I ran into another problem. If you can, (you do not have to) could you maybe help me with this post?