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: Strings can't have connection events?

Previous Thread :: Next Thread 
Aurarus is not online. Aurarus
Joined: 22 Dec 2008
Total Posts: 4761
24 Sep 2011 08:07 AM
TextBox.Text.Changed:connect(Derp)


So apparently Text can't have a connection line attached to it, because when I run the script (This aint the entire script) it sees "Changed" as a property, and then calls it nil.

How can I tell a script to run when the string changes?
Report Abuse
Aurarus is not online. Aurarus
Joined: 22 Dec 2008
Total Posts: 4761
24 Sep 2011 08:15 AM
Help? 3:
Report Abuse
Aurarus is not online. Aurarus
Joined: 22 Dec 2008
Total Posts: 4761
24 Sep 2011 08:21 AM
Come on people, I really need help here...
Report Abuse
Aurarus is not online. Aurarus
Joined: 22 Dec 2008
Total Posts: 4761
24 Sep 2011 08:28 AM
:'(
Report Abuse
ImpalerOfSouls is not online. ImpalerOfSouls
Joined: 17 Jan 2010
Total Posts: 2165
24 Sep 2011 08:34 AM
TextBox.Changed(function(p)
if p=="Text" then



end
end)

Something like that?
Report Abuse
xvgigakid is not online. xvgigakid
Joined: 22 Jun 2008
Total Posts: 4407
24 Sep 2011 08:37 AM
Changed is an event. Not a method....

TextBox.Changed:connect(function(Text)

end)
Report Abuse
Aurarus is not online. Aurarus
Joined: 22 Dec 2008
Total Posts: 4761
24 Sep 2011 08:37 AM
Text is a child of TextBox. Text is a StringValue, while Textbox is just a GUI object.

Saying TextBox.Changed isn't specifying what is being changed.
Report Abuse
Aurarus is not online. Aurarus
Joined: 22 Dec 2008
Total Posts: 4761
24 Sep 2011 08:39 AM
In the original post, when i said "connection line" I meant "connection event"
Report Abuse
xvgigakid is not online. xvgigakid
Joined: 22 Jun 2008
Total Posts: 4407
24 Sep 2011 08:39 AM
I just specified it.
Read through my script.
Report Abuse
xvgigakid is not online. xvgigakid
Joined: 22 Jun 2008
Total Posts: 4407
24 Sep 2011 08:39 AM
It isnt called a connection line of connection event.

connection is a method.
It is called a connection STATEMENT.
Report Abuse
ImpalerOfSouls is not online. ImpalerOfSouls
Joined: 17 Jan 2010
Total Posts: 2165
24 Sep 2011 08:41 AM
Oh sorry forgot :connect


Anyway, specify text by checking if the value is text.
Report Abuse
xvgigakid is not online. xvgigakid
Joined: 22 Jun 2008
Total Posts: 4407
24 Sep 2011 08:43 AM
Dude....
LOOK AT MY SCRIPT. I clearly specified im looking through Text...
Report Abuse
ImpalerOfSouls is not online. ImpalerOfSouls
Joined: 17 Jan 2010
Total Posts: 2165
24 Sep 2011 08:47 AM
Doesn't that just call the variable Text?
Report Abuse
xvgigakid is not online. xvgigakid
Joined: 22 Jun 2008
Total Posts: 4407
24 Sep 2011 08:49 AM
TextBox.Changed:connect(function(Text) --Text is right there!, changed event is there!

end)

Ill dumb it down a bit...

function changed(Text) --Text as the argument.

end
TextBox.Changed:connect(changed) --Changed event
Report Abuse
ImpalerOfSouls is not online. ImpalerOfSouls
Joined: 17 Jan 2010
Total Posts: 2165
24 Sep 2011 08:50 AM
function changed(Text)
print(Text)
end
TextBox.Changed:connect(changed)

could be ANY property.

He wants to know when the TEXT property is changed.

Changed returns the name of the property changed...
Report Abuse
ImpalerOfSouls is not online. ImpalerOfSouls
Joined: 17 Jan 2010
Total Posts: 2165
24 Sep 2011 08:54 AM
Wait, does he?
"Text is a child of TextBox. Text is a StringValue, while Textbox is just a GUI object.

Saying TextBox.Changed isn't specifying what is being changed."
just confused me.


property = "Text"
TextBox:findFirstChild("Text").Changed:connect(function(p)
if p==property then
--this kind of thing?
end
end)
Report Abuse
xvgigakid is not online. xvgigakid
Joined: 22 Jun 2008
Total Posts: 4407
24 Sep 2011 08:55 AM
>function changed(Text)
>print(Text)
>end
>TextBox.Changed:connect(changed)
>
>could be ANY property.


Any Property???

function changed(Text) --TEXT IS IN THE PARENTHESIS!!!! Thats the argument changed events use!
Report Abuse
nike6330 is not online. nike6330
Joined: 11 Feb 2009
Total Posts: 154
24 Sep 2011 08:56 AM
@xv in your script the Text arguement would return the changed property name right?, so its not probably .Text?
Report Abuse
ImpalerOfSouls is not online. ImpalerOfSouls
Joined: 17 Jan 2010
Total Posts: 2165
24 Sep 2011 08:58 AM
@OPer:
It's very confusing for debug purposes to call something TextBox and give it a child called Text. it makes me think it is a TextBox and that text is the property.

@xvgigakid:
Looked it up.
"STRING property"
otherwise it's a variable.
Report Abuse
ImpalerOfSouls is not online. ImpalerOfSouls
Joined: 17 Jan 2010
Total Posts: 2165
24 Sep 2011 08:59 AM
TextBox.Text.Changed:connect(function(p)
if p=="Value" then


end
end)


That?
Report Abuse
Aurarus is not online. Aurarus
Joined: 22 Dec 2008
Total Posts: 4761
24 Sep 2011 09:00 AM
Neither of these things worked :\

I just need this script because in my GUI Inventory, whenever an object within it gets selected, the label which says "- Inventory -" suddenly just dissapears.
Report Abuse
xvgigakid is not online. xvgigakid
Joined: 22 Jun 2008
Total Posts: 4407
24 Sep 2011 09:01 AM
@Nike

I use .Changed a LOT! I know what im talking about. If you want everything to be solved just try it out.

Take a NumberValue and put this script in it

script.Parent.Changed:connect(function(Value)
print("Number Is Changed")
end)
Report Abuse
xvgigakid is not online. xvgigakid
Joined: 22 Jun 2008
Total Posts: 4407
24 Sep 2011 09:02 AM
It isnt a string property. Just try out my script in a number value and run it. Change the value of NumberValue and see what happens.
Report Abuse
ImpalerOfSouls is not online. ImpalerOfSouls
Joined: 17 Jan 2010
Total Posts: 2165
24 Sep 2011 09:03 AM
@xvgigakid

If you change the name of that value, does it still print?
Report Abuse
nike6330 is not online. nike6330
Joined: 11 Feb 2009
Total Posts: 154
24 Sep 2011 09:05 AM
No, He is right. I am sorry, i tested it.
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