How to rotate a part relative to another part

  1. What do you want to achieve?
    I want to rotate a part relative to another part.

  2. What is the issue?
    Only one of the parts gets rotated correctly since It’s getting rotated on the correct axis.

  3. What solutions have you tried so far?
    Tried using some of the CFrame functions like :ToObjectSpace(), but couldn’t figure anything out. Also tried looking for solutions online, but didn’t know what to search since I don’t know what to even call this problem.

poster.Orientation = Vector3.new(0,0, random:NextNumber(-10, 10)) 

I could get the orientation of the board, but I’d have no idea which axis to add onto to rotate the poster.

This problem is known as rotating to surface normal. Surface normal can be visualized as an arrow standing perpendicular upright on any surface a ray touches. These posts below should help

2 Likes

I think I found the function I need to use from the advanced CFrame post, I’ll see if it works.

image
Slowly getting there

1 Like

Got it to work perfectly, tysm.

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