generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

help with script

Previous Thread :: Next Thread 
ScriptingTales is not online. ScriptingTales
Joined: 22 Jun 2017
Total Posts: 531
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
ScriptingTales is not online. ScriptingTales
Joined: 22 Jun 2017
Total Posts: 531
09 Oct 2017 11:09 PM
like i have the script in the studs textlabel
Report Abuse
Good_Scripter is not online. Good_Scripter
Joined: 10 Apr 2009
Total Posts: 180
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
Good_Scripter is not online. Good_Scripter
Joined: 10 Apr 2009
Total Posts: 180
09 Oct 2017 11:21 PM
You need to use Mouse.Hit.p *
Report Abuse
ScriptingTales is not online. ScriptingTales
Joined: 22 Jun 2017
Total Posts: 531
09 Oct 2017 11:50 PM
thank you!
Report Abuse
ScriptingTales is not online. ScriptingTales
Joined: 22 Jun 2017
Total Posts: 531
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image