Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I get the Vector3 of a click?

Asked by
lucas4114 607 Moderation Voter
9 years ago

So, basic, a player clicks somewhere, and I need to get the Vector3 of where they are clicking?..

1 answer

Log in to vote
3
Answered by 9 years ago

Mouse.Hit is the CFrame of the mouse.

If we take a look at a CFrame's properties, we will see that the p property leads to its Vector3.

So, Mouse.Hit.p is the Mouse's Vector3 value.

0
Nicely put. DevChris 235 — 9y
Ad

Answer this question