|
| 09 Oct 2017 11:05 PM |
how would i show how many studs away i am from something my mouse is touching
(im scripting a scope that lets you see how far you are from whatever your mouse is touching) |
|
|
| Report Abuse |
|
|
|
| 09 Oct 2017 11:09 PM |
| like i have the script in the studs textlabel |
|
|
| Report Abuse |
|
|
|
| 09 Oct 2017 11:18 PM |
Depending on how much experience you already got I can give you those hints:
Use Mouse.Hit to get the position the mouse is pointing to and use Humanoidrootpart or whatever as the second position
then you simply do that:
local distance = (Mouse.Hit - charpart.Position).magnitude |
|
|
| Report Abuse |
|
|
|
| 09 Oct 2017 11:21 PM |
| You need to use Mouse.Hit.p * |
|
|
| Report Abuse |
|
|
| |
|
|
| 10 Oct 2017 12:00 AM |
it always gives me a long number like 34.94121841512
how would i get rid of that last long bit? |
|
|
| Report Abuse |
|
|