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: How To Set Text To A Variable?

Previous Thread :: Next Thread 
PurelyRandom is not online. PurelyRandom
Joined: 05 Mar 2011
Total Posts: 36763
16 May 2014 10:26 AM
How would I take whatever Text is in, for example, a TextLabel and put that into a variable?


Like if the TextLabel's Text property is "Hello", how would I set that text to a variable?

(And I know I can just make a variable set to a string with the same text as the TextLabel's Text, but what if the Text constantly changes?)
Report Abuse
MrChubbs is not online. MrChubbs
Joined: 14 Oct 2010
Total Posts: 4969
16 May 2014 10:29 AM
Do you mean:
local s = Path.To.TextLabel.Text

or do you mean:
local s = Path.To.TextLabel.Text
Path.To.TextLabel.Changed:connect(function(v)
if v == "Text" then
s = Path.To.TextLabel.Text
end
end)
Report Abuse
PurelyRandom is not online. PurelyRandom
Joined: 05 Mar 2011
Total Posts: 36763
16 May 2014 10:30 AM
The first one
Report Abuse
PurelyRandom is not online. PurelyRandom
Joined: 05 Mar 2011
Total Posts: 36763
16 May 2014 10:40 AM
Huh, I thought of something while waiting.

Is it possible to set the string of a StringValue to the Text property of a TextLabel and vice versa?
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
16 May 2014 10:41 AM
stringval.Value = textlbl.Text
textlbl.Text = stringval.Value
Report Abuse
PurelyRandom is not online. PurelyRandom
Joined: 05 Mar 2011
Total Posts: 36763
16 May 2014 10:51 AM
Alright, thanks.

I'll just do that.
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