Problem with make from Script Size (Udim2)

  1. What do you want to achieve? So i try make From script make like this:
    Problemos

  2. What is the issue? But work it like this
    script

local part = script.Parent

local BillboardGui = Instance.new("BillboardGui", part)
BillboardGui.Name = "BillboardGui"

local Text = Instance.new("TextLabel", BillboardGui)
Text.Name = "Text"
Text.Size = UDim2.new(0,500,0,100)
Text.Position =  UDim2.new(10,10,10,10)

Game Start…
and We have…
This:
Probemos1
– In propeties we have this

  1. What solutions have you tried so far? I try see in youtobe, its not work.
2 Likes

2 problems:

  1. You’re only setting the size of the TextLabel; The size of the BillboardGui will stay at 0, 0, 0, 0. As the size is 0 pixels, it won’t render anything inside of it. Set the size to anything larger than that and it will render the TextLabel.
  2. You’re setting the position of the TextLabel to 10 times the size of the BillboardGui on both axes. As that is outside of the BillboardGui, the TextLabel will not render. Play around with the position or just leave it at the default of 0, 0, 0, 0.
1 Like

Can you gave me Exsampl pls. i just try and its now work (anyway thx for answer)

Similarly to how you sized the TextLabel, you can write BillboardGui.Size = UDim2.new(size); just replace size with whatever you need.
You can delete the line where you set the position of the TextLabel, as it defaults to 0, 0, 0, 0. Otherwise, play around with the position and find something you like.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.