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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Can someone help me fix this script?

Previous Thread :: Next Thread 
jobii is not online. 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
Vaporation is not online. Vaporation
Joined: 08 Jun 2011
Total Posts: 1397
30 Dec 2013 07:13 AM
Is there any output?
Report Abuse
jobii is not online. 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 is not online. 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
Vaporation is not online. Vaporation
Joined: 08 Jun 2011
Total Posts: 1397
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 is not online. 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 is not online. 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
Vaporation is not online. Vaporation
Joined: 08 Jun 2011
Total Posts: 1397
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 is not online. 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
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