:GetPropertyChangedSignal() doesn't work

Hi, I’m trying to make something to avoid that normal script doesn’t get the newest text of a TextBox.
Here’s the script I’ve tried:
NOTE: It doesn’t print anything even when I change it’s text

script.Parent.Parent.TextBox:GetPropertyChangedSignal("Text"):Connect(function()
	print("It was changed!")
	id = script.Parent.Parent.TextBox.Text
end)

I think you should be detecting changes to ContentText instead of Text itself. Maybe thats why it doesnt work, although I am not exactly sure.

Are you using a server script or a local script?

Try the code below and let me know if it works or not.

script.Parent.Parent.TextBox:GetPropertyChangedSignal("ContentText"):Connect(function()
	print("It was changed!")
	id  = script.Parent.Parent.TextBox.ContentText
end)

Can the reason be that I use a server script instead of a local script?

If you are changing the text in studio, and have not switched over to the server view and this script is a ServerScript, then the event will not fire because the server cannot see changes made exclusively on the client. Try switching to server view if you haven’t already and then change the text.

Oh yes. If you were using a Server Script, you should use a local script instead. Server cannot detect changes on the client so you need to use a local script to detect text changes.

script.Parent.Parent.TextBox:GetPropertyChangedSignal("Text"):Connect(function()
	print("It was changed!")
	id = script.Parent.Parent.TextBox.Text
end)

Yeah that is most likely the problem. Try changing it to a LocalScript and see if that helps.