Just a simple line of code I need.
1 Like
You could use CFrame.LookAt
on the player’s HumanoidRootPart
.
1 Like
Yeah, but why would I want them to look down to the ground. I’m making a bow where it follows your mouse, but it only configures the Y axis orientation
Only use it on the X and Z axis:
Root = HumanoidRootPart
RootPos = Root.Position
--MousePos = player's mouse
Root.CFrame = CFrame.new(RootPos, Vector3.new(MousePos.X, RootPos.Y, MousePos.Z))
1 Like
hrp.CFrame = CFrame.lookAt(hrp.CFrame.Position, Vector3.new(mouse.Hit.Position.X, hrp.CFrame.Position.Y, mouse.Hit.Position.Z))
2 Likes
Oh my goodness that works right away, thanks so much!