I'm currently trying to make a part go to wherever I click, which I 'm capable of doing, using CFrame.new(Mouse.Hit.p) - But, I want it to rotate with the mouse too. The mouse, suprisingly, has rotation CFrame too, as I discovered a while ago. I actually forget how I got it, but that's besides the point; I threw that part out when I couldn't figure out how to restrict it to one axis, IE, to turn it rather than to fully rotate and flip it too.
How would I go about getting the mouse's cframe, and restricting it so it only turns on one axis?
CFrame.new (Mouse.Hit.p, Vector3.new(Mouse.Hit.p.x, Part.Position.Y, Mouse.Hit.p.z))
Use this CFrame. The first Mouse.Hit.p gives it the position that it is going to go to when you click, and then the
Vector3.new(Mouse.Hit.p.x, Part.Position.Y, Mouse.Hit.p.z)
will rotate it to the position the the mouse it looking at on the y axis.