My question is that, i'm trying to detect if a text of a TextBox is changed and i don't know a way of doing that. Im trying to do it so when a textbox text is changed it uses Instance.new to create as NumberValue and set the value to the text. If anyone could help thanks :)
COMMUNITY QUESTION
How do i detect a Gui Textbox changed?
2 answers
Ok, so. Get familiar with the :GetPropertyChangedSignalChanged() function. This requires the property you want to be checked for, such as :GetPropertyChangedSignal("Text"), you then need to connect that to a function
Gui.Textbox:GetPropertyChangedSignal("Text"):Connect(function(textNow) --this function doesn't return anything, so "textNow" won't work
textNow = Gui.Textbox.Text --refer to it back over here, now it will
print(textNow)
end)
1 comment
0
Note that attempting to detect changes to the text on the server wont work; just wanted to point that out. c:
You can check if the text of a textbox has been changed using the :GetPropertyChangedSignal() event and setting the signal to check the text of the box.
Local Script under the TextBox
script.Parent:GetPropertyChangedSignal("Text"):Connect(function()
print(script.Parent.Text)
end)
The above example prints the text of the box as it changes
1 comment
0
Fair well, Serpent
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
FocusLost and Focused or using what block mask said.