Hi,
I’m making an airport departure board. There is one column that has scrolling text.
My script resizes the TextLabel until the text fits. Now I want to resize it again after I changed the text, which is my problem.
I can’t detect if my Text has changed.
I tried the following:
local text = script.Parent.TextLabel
text.Changed:Connect(function(property)
if property == "Text" then
print("yessss change")
text.Size = UDim2.new(1,0,1,0)
changedsize = false
end
end)
text:GetPropertyChangedSignal("Text"):Connect(function()
print("yessss change")
text.Size = UDim2.new(1,0,1,0)
changedsize = false
end)
2 questions: 1: does it print “yessss change”?
and what’s the parent? if it’s in a frame and it prints, then you should change the size of the parent, or use the offset instead of the scale to resize it outside it’s boundaries.
The print thing is for me to know that it worked (so I don’t have to go in the explorer and see if it re-sized it.
The parent is another TextLabel, the scrolling (and now change detection) works very well.