i am VERY SORRY for not knowing how to do this but i reeaally have to post this because i cant quite find the right solution. so, basically, i want to make a little sword thingy face the player’s mouse. i already have the methods for finding the mouse position but thats beside the point, all i want to do is to make the sword look at that position with it’s upper side.
i do think its possible to do with lookat but i dont think that will work for me, since, well, it makes the front lookat the position. please help.
1 Like
Pretty sure the documentation for CFrame:LookAt()
tells you how to do exactly this.
EDIT: Not for CFrame:LookAt()
but for CFrames.
1 Like
oh yeah ill look there when i get back
1 Like
didnt find anything at the cframe documentation but i diid find some random post that helped me. this is the solution:
CFrame.lookAt(workspace.cameramoveto.Position, workspace.portal.Position) * CFrame.Angles(-math.pi/2,0,0)
i am clueless as to how does math.pi achieve such things but hey it works.