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 » Scripters
Home Search
 

Re: How do u use TextBounds to size a gui according to its text

Previous Thread :: Next Thread 
IceFromSpace is not online. IceFromSpace
Joined: 12 Dec 2015
Total Posts: 710
22 May 2016 04:18 PM
Pls leave an example I can work off of
Report Abuse
Erediin is not online. Erediin
Joined: 13 Mar 2016
Total Posts: 756
22 May 2016 04:20 PM
wiki


Report Abuse
IceFromSpace is not online. IceFromSpace
Joined: 12 Dec 2015
Total Posts: 710
22 May 2016 04:23 PM
The wiki just says that it returns a vector 2 as the size of the text labels text. I don't know what to do with that vector 2
Report Abuse
Erediin is not online. Erediin
Joined: 13 Mar 2016
Total Posts: 756
22 May 2016 04:24 PM
search on the wiki "Vector2"


Report Abuse
IceFromSpace is not online. IceFromSpace
Joined: 12 Dec 2015
Total Posts: 710
22 May 2016 04:26 PM
Ohh so there width and height
Report Abuse
guges is not online. guges
Joined: 07 May 2016
Total Posts: 1515
22 May 2016 04:29 PM
It's basically a vector but with two dimensions. You can use the x and y dimensions to scale your gui.

local textSize = randomGui.TextBounds
local newSize = UDim2.new(0,textSize.x + 10,0,textSize.y + 10)
randomGui.Size = newSize

Something like that
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