How do I get Mouse CFrame?

So I was just wondering how can I get the player’s Mouse CFrame?

is this what u need?

local mouse = game.Players.LocalPlayer:GetMouse()

game:GetService("RunService").RenderStepped:Connect(funtion()
      print(mouse.Hit.Position)
end)
1 Like

Nope. That’s just the position. I need the CFrame.

What i’m trying to do exactly is i’m trying to set a model’s PrimaryPartCFrame to the mouse CFrame.

wait, are u trying to make a part follow the mouse?

1 Like

CFrame.new(mouse.Hit.Position)

2 Likes

Okay thanks that’s exactly what I was looking for.

mouse.Hit is all you need, it’s already a CFrame.

1 Like

Yeah, but if you do that the model will literally stare into your soul (I don’t know how to explain this, this is all I got)

2 Likes

CFrame contains rotation data and if you use mouse.Hit, it will contain the rotation data oriented towards the camera.
If he needs a CFrame as he said he did, this is what he uses. If he only needs a position but he needs to convert it to CFrame format, he should use the other solution.

2 Likes