Can someone please explain Mouse.Hit.p

The topic is quite self explanatory, can someone please explain Mouse.Hit.p to me, also can someone tell me whether it’s deprecated or not?

Mouse.Hit.p is basically the position the mouse’s position in 3D space, and also it is deprecated (I believe) but you can use Mouse.Hit.Position, does pretty much the same thing.

Its the position of the mouse, Mouse.Hit is the CFrame and the p means the position of the CFrame in Vector3

2 Likes

Mouse.Hit is your mouse’s cframe, and p is a property of CFrame that gets the vector 3 position.

2 Likes

So mouse.hit is in 2D space and .p is in 3D space?

No, he didn’t mean that. Mouse.Hit is a CFrame value, whereas when you add .P it gets the Vector3 Position.

1 Like

CFrame is the 3d coordinates with more information on the rotation, if you want to just get the 3d coordinates of a cframe, you would do CFrame.Position

1 Like

Or CFrame.p in short, correct?

Yeah, although iirc using p is deprecated, you should just use Position, even if it’s longer

1 Like

Ok, thank you so much for your help!