Hi, first question here!
I'm uncertain how to make a part face the direction of your mouse (continuously) in FE conditions. What I wanted to do was essentially, every time a player right-clicks the screen, a part is created. The part will be placed above the character's head and will constantly face the direction of the mouse.
I understand that I detect right-click through a local script and create a part through a RemoteEvent and a script. I also know how to make a part face a direction with CFrames. What I don't know how to do is how to make it constantly face the mouse.
I looked up different articles and read that the mouse Instance cannot be passed through a RemoteFunction. The only solution I have is using a RemoteFunction to invokeClient and return mouse.Hit in a while loop.
EDIT: I want to emphasize that I do understand that I have to use CFrame.new(part.Position, mouse.Hit.p). I'm asking how do I achieve making all players see the part rotating without the use of a while-loop in a script that invokesClient for a mouse.Hit!

3 comments
Oh, no, I know how to use CFrames! I just meant how do I make it constantly face the mouse so all players will see it rotating.
Try using a loop
Or raycasting idk.