I have a text input box and a text label. I want the text label to change based on what is entered in the input box.
I'm trying to figure out how to use this function to initiate a change in my text label when the text input box changes.
Here's my current attempt:
game.StarterGui.ScreenGui.MbsV:GetPropertyChangedSignal("Text"):Connect(function(text) print("Text:", text) end)
But it doesn't do anything. I don't know how this function is supposed to be formatted or used. There's no documentation on this that I can find.
http://wiki.roblox.com/index.php?title=API:Class/Instance/GetPropertyChangedSignal
Your problem is that the method doesn't return the new value of the property, so 'text' will be nil. You have to index the property again.
local object = game.StarterGui.ScreenGui.MabsV object:GetPropertyChangedSignal("Text"):Connect(function() print("Text:", object.Text) end)
Note: Guis seen in game are in the Player's PlayerGui, not StarterGui - so this script is expected to only really be used from the command bar in studio.