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)
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?
CFrame.new(mouse.Hit.Position)
Okay thanks that’s exactly what I was looking for.
mouse.Hit
is all you need, it’s already a CFrame.
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)
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.