This is supposed to check if the current X TextBounds is bigger, and if it's bigger, it should change the variable to the new X TextBounds. However this isn't changing the value. I'll show you why below.
--NewMessage is a ScrollingFrame and Content is a TextLabel.
local X = 0
if X < newMessage.Content.TextBounds.X then
print('Fixing.. X is ' .. X .. ' and will be ' .. newMessage.Content.TextBounds.X)
local X = newMessage.Content.TextBounds.X
end
print('X = ',X)
OUTPUT
Fixing.. X is 0 and will be 161
X = 0
Why is the value not changing to 161? Is it something simple that I kept forgetting? Thanks! :)
