jobii
|
  |
| Joined: 01 Nov 2010 |
| Total Posts: 80 |
|
|
| 30 Dec 2013 07:08 AM |
At the moment i'm building a chat gui. I tried to make 2 different textlables: 1 for the player name and 1 for the message. Only it won't place the message behind the player name:
script.Parent.Line1.Player.Text=game.Workspace.Chat.Line1.Player.Value wait() local A = script.Parent.Line1.Player.TextBounds.x local B = A + 10 script.Parent.Line1.Text.Position = UDim2.new(0,0,0,B) script.Parent.Line1.Text.Text = game.Workspace.Chat.Line1.Text.Value
Can someone please explain to me, why this isnt working?
Jobii |
|
|
| Report Abuse |
|
|
| |
|
jobii
|
  |
| Joined: 01 Nov 2010 |
| Total Posts: 80 |
|
|
| 30 Dec 2013 07:22 AM |
| It says that A = (0,0), but when I look at the textlable it says it's (30,24). |
|
|
| Report Abuse |
|
|
jobii
|
  |
| Joined: 01 Nov 2010 |
| Total Posts: 80 |
|
|
| 30 Dec 2013 07:23 AM |
| I mean it says that a = 0 but when I look at the textlable it says that the textbounds = (30,24) |
|
|
| Report Abuse |
|
|
|
| 30 Dec 2013 07:24 AM |
Are you trying to get the position of the TextLabel? If so:
script.Parent.Line1.Player.TextBounds.Position |
|
|
| Report Abuse |
|
|
jobii
|
  |
| Joined: 01 Nov 2010 |
| Total Posts: 80 |
|
|
| 30 Dec 2013 07:27 AM |
| No i'm trying to get the size of the text: with textbounds. |
|
|
| Report Abuse |
|
|
jobii
|
  |
| Joined: 01 Nov 2010 |
| Total Posts: 80 |
|
|
| 30 Dec 2013 07:30 AM |
But it's strange... When I look in my test server it says that the textbounds = 0,0 but when I look in my test player it says that the textbound = (24,30)
|
|
|
| Report Abuse |
|
|
|
| 30 Dec 2013 07:35 AM |
idk
This might be a bit problematic though: script.Parent.Line1.Text.Text
The script might think you are referring the first "Text" to the text property, so use script.Parent.Line1["Text]".Text instead. |
|
|
| Report Abuse |
|
|
jobii
|
  |
| Joined: 01 Nov 2010 |
| Total Posts: 80 |
|
|
| 30 Dec 2013 07:39 AM |
I putted the script in a local script, and it worked :D
Thanks everybody for your help! |
|
|
| Report Abuse |
|
|