How To Rotate Part Relative To Where Part Is Facing?

I Been Messing With CFrame.Angles I For Few Hours Now I Can’t Seem Get The Parts To Face Relative To Where The Wall Is Facing

https://i.gyazo.com/2ec7ac4d9a71bed786a06e238638fcdb.mp4

That How The Problem Looks Like It Only Works On 1 Axis But The Other One Axis Doesnt Work

https://i.gyazo.com/f99546ad97e2b979d0d425c1bc00886d.mp4

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
local Angle = 0

for i = 1,30 do
	local Size = math.random(2,3)
	local Part = Instance.new("Part")
	Part.Anchored = true
	Part.Size = Vector3.new(Size,Size,Size)
	Part.CFrame = CFrame.new(Target.Position) * 
        CFrame.fromEulerAnglesYXZ(math.rad(Angle),0,0)
	Part.Parent = workspace.DebrisFolder	

	game.Debris:AddItem(Part,113)
end

Just set the part Cframe to the character cframe

Part.CFrame = Target.CFrame

I’m trying to make a circle around the target it doesn’t wanna face the correct direction, I’m not trying just to put the part at the target location

Thats sets the part position and orientation relative to the target

part.CFrame = wall.CFrame.Rotation

-- you might need to rotate the part if its not facing the correct way
-- part.CFrame *= CFrame.fromOrientation(0, math.rad(90), 0)

Part.Position = Target.Position

but that doesn’t make it in to a circle what im trying to do is make raycast rock effect on a wall but the angle doesn’t stay the same

https://gyazo.com/3c1b534c3f13e501bbbb35f2dbaa1eea
https://gyazo.com/4c94e3a4545ad139bee73d0d00430641

You need to use the surface normal for this. A surface normal is a vector that is perpendicular to a given object. In the image below, It shows the surface normal (direction its pointing) of given point on the curved plane.
image

You can do this on roblox using raycasts like this:

	local rayOrigin = character.HumanoidRootPart
	local rayDirection = Vector3.new(0, -100, 0) * 100 --direction the ray shoots * distance you want it to shoot 
 
	local raycastParams = RaycastParams.new()
	raycastParams.FilterDescendantsInstances = {character.HumanoidRootPart} --blackists yourself from getting hit with the ray 
	raycastParams.FilterType = Enum.RaycastFilterType.Blacklist
	local raycastResult = workspace:Raycast(rayOrigin, rayDirection, raycastParams)

	print("Surface normal at the point of intersection:", raycastResult.Normal)

Documentation here: WorldRoot:Raycast

but how do you use that idk how to implement it?