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: Billboard Gui

Previous Thread :: Next Thread 
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
08 Dec 2012 07:01 PM
So i got an example, but i dont understand why theres 3 size lines, and theres only one text:

BillboardGui = Instance.new("BillboardGui", Part)
BillboardGui.Adornee = Part
BillboardGui.StudsOffset = Vector3.new(0, -2.5, 0)
BillboardGui.Size = UDim2.new(0.3, 0, 0.5, 0)-----1

TextLabel = Instance.new("TextLabel", BillboardGui)
TextLabel.Text = "Hello there!"
TextLabel.FontSize = "Size14"-----------------------2
TextLabel.Size = UDim2.new(2,0,2,0)---------------3
TextLabel.BackgroundTransparency = 1

Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
08 Dec 2012 07:01 PM
And only fontsize made it grow, the 2 others doesent do anything
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
08 Dec 2012 07:11 PM
bump
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
09 Dec 2012 06:05 AM
bump
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
09 Dec 2012 06:24 AM
bump
Report Abuse
matthewpawley is not online. matthewpawley
Joined: 05 Sep 2012
Total Posts: 129
09 Dec 2012 06:28 AM
I don't get scripting.
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
09 Dec 2012 06:33 AM
Then dont bother posting.
Report Abuse
Monkey727 is not online. Monkey727
Joined: 12 Jan 2009
Total Posts: 969
09 Dec 2012 06:45 AM

1 - The size of the BillboardGui on the screen, The total size for all the other Gui objects inside it.
2 - Sets the Font size for the textLabel, The size of the font displayed.
3 - The size of the TextLabel on the screen.

UDim2 sizes are like this:

UDim2.new(XScale, XOffset, YScale, YOffset)

if XScale and YScale are 1, It is the full size of the screen, Since different computers can have a different screen size it is useful to use this when getting the centre of the screen.

Check this out for more info on UDim2 sizes:
http://wiki.roblox.com/index.php/UDim2
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
09 Dec 2012 06:58 AM
The size on the so textlabel (not the fontsize one) makes it move, not size, im need to be explained better (im not saying it was bad, i just dont understand it)
Report Abuse
Monkey727 is not online. Monkey727
Joined: 12 Jan 2009
Total Posts: 969
09 Dec 2012 07:05 AM
Okay, UDim2 sizes firstly don't exactly make things "Move" that is to do with the Position.

With any Guis, Including BillboardGuis and ScreenGuis, You can set the size of anything on the screen such as a TextLabel, It creates a box where it has text inside it. The text will move to the centre of the box. Gui objects are all 2D, So only have widths and heights, Though they can be set in different ways.

As I said before:

UDim2.new(XScale, XOffset, YScale, YOffset)

Firstly XOffset and YOffset are the easiest to handle, They are simply the length in pixels of the TextLabel on the screen, So UDim2.new(0,50,0,50) makes a Square, with a length and width of 50.

XScale and YScale are slightly different, They are sizes relative to the screen's size.
UDim2.new(1,0,1,0) is equal to the entire size of the screen, So UDim2.new(0.5,0,0.5,0) is the centre of the screen, etc.

Positions can also be set using UDim2, It sets the top left corner of the TextLabel to the UDim2 stated.

Does that help? :S
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
09 Dec 2012 11:10 AM
So, its the size of the frame but not the text?
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
09 Dec 2012 11:14 AM
bump
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
09 Dec 2012 02:09 PM
Im bumping this cuzz i wanna get confirmed if its the size of the frame but not the text...
Report Abuse
Monkey727 is not online. Monkey727
Joined: 12 Jan 2009
Total Posts: 969
09 Dec 2012 02:10 PM
Frame.Size sets the frame's size.
TextLabel.Size sets the textlabels size.

??
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
09 Dec 2012 03:48 PM
its frame or the roblox is screwup and the 2 other sizes doesnt do anything.The only thing textlabel size did was moving it to the right, so since its size, i take it its a sort of rame around the text
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
10 Dec 2012 09:52 AM
this thread is going to be bumped till i understand the two other sizes.
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
11 Dec 2012 03:25 PM
bump
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