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
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Largest Value in a Vector3

Previous Thread :: Next Thread 
bluerobin2 is not online. bluerobin2
Joined: 21 Oct 2011
Total Posts: 112
20 Jun 2014 06:47 PM
I want to get the largest value in a vector3. How do I do this?
Report Abuse
robertjh12 is not online. robertjh12
Joined: 24 Feb 2008
Total Posts: 601
20 Jun 2014 06:49 PM
A vector3 is a position. Explain better... You want the highest of the 3 numbers X,Y,Z, or comparing distances of 2 objects relative to position, or what is it you want?
Report Abuse
IAmTheRolo is online. IAmTheRolo
Joined: 12 Nov 2013
Total Posts: 859
20 Jun 2014 06:50 PM
value = Vector3.new(5,10,25)
function RetrieveLargestNumberInVector3(vector3)
return math.max(vector3.X,vector3.Y,vector3.Z)
end

print(RetrieveLargestNumberInVector3(value))

>25
Report Abuse
bluerobin2 is not online. bluerobin2
Joined: 21 Oct 2011
Total Posts: 112
20 Jun 2014 06:55 PM
Thanks
Report Abuse
EncodedLua is not online. EncodedLua
Joined: 02 May 2012
Total Posts: 1555
20 Jun 2014 06:57 PM
It should be 2048 if you mean size
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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