I’m not really sure how to describe my problem so I have created a diagram to explain it. I want to be able to place parts on walls and rotated parts flush with the sides. I presume you would use raycasts and surface normals for this but I am not quite sure.
1 Like
Maybe this can help?
To get the normal you can just do RaycastResult.Normal.
2 Likes
Thanks for pointing me in the right direction. This has worked for me for the most part. Do you have any idea how I would make these blocks face the other way upon being placed (as shown)
You can just rotate the CFrame relative to the normal which only needs a little bit of experimenting to get right.
Eg:
part.CFrame *= CFrame.Angles(0, math.rad(90), 0)