Hello, i'm making and admin GUI, i have completed some parts of it but i added it auto scale, but i dont want to use TextScaled since it can size it to 100, so i made this
function SendMessage(Message,Type)
-- Here its only making the msg
local Output = script.Parent.Console.Output
local MSGTXT = script.Parent.Console.Txt:Clone()
MSGTXT.Text = Message
if Type == "error" then
Type = Color3.fromRGB(255,0,0)
end
if Type == "say" then
Type = Color3.fromRGB(255,255,255)
end
if Type == "green" then
Type = Color3.fromRGB(125,255,0)
end
if Type == "warning" then
Type = Color3.fromRGB(255,90,0)
end
MSGTXT.Parent = Output
MSGTXT.Name = Message
MSGTXT.TextColor3 = Type
MSGTXT.Font = Font -- Font is saved in dataStore
MSGTXT.Parent = Output
MSGTXT.Visible = true
local function redo() -- here you start scaling
if MSGTXT.TextFits == false then
MSGTXT.TextSize = MSGTXT.TextSize-1
if MSGTXT.TextFits == false then
redo()
end
end
end
redo() -- make the text fit to its size
end
My problem is that it sizes it to almost 0 the worst is that it fits but it still loops, what could i do to fix this? Error:
Could not display entire 1441791 character message because message exceeds max displayable length of 16839

3 comments
i changed the bottom redo because that seemed to loop it on my side
Actually no, redo is not being called
exactly i changed it