How do i make a TextLabel Scale the text to the size of the label but not to how many words are inside the label?
like the text becomes bigger when the label is scaled up but it doesnt change when words are added/removed
You should be able to do something like this:
-- config:
local TextLabel = nil -- set this
local Multiplier = 0.25 -- mess around with this value to get it sizing correctly
local BasedOnY = true -- change whether it scales on the X size or Y size of the label
-- actual code:
TextLabel:GetPropertyChangedSignal("AbsoluteSize"):Connect(function()
local Size = TextLabel.AbsoluteSize
TextLabel.TextSize = (BasedOnY and Size.Y or Size.X) * Multiplier
end)
(Code is completely untested. Should be functional though - if not just let me know the issue)
The value of Multiplier will need to be quite small if you have BasedOnY set to false
1 Like
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.