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?

3 comments
I don't know HOW it rotates it on the Y axis when you lock the Y axis to the part.position, and only change the X and Z axis. And for some reason this isn't working, it rotates them to a very weird angle - one axis turns it sideways, the other flips it on its side, and the Y axis jut turns it diagonally. (Tried them all separately.. )
I'm using Template:SetPrimaryPartCFrame(CFrame.new(Mouse.Hit.p + Vector3.new(0,0.5,0), Vector3.new(Mouse.Hit.p.x, Template.PrimaryPart.Position.y, Mouse.Hit.p.z))) - what am I doing wrong?
No matter how I combine them, they seem to not even orient based on the mouse's cframe, just a static, weird angle