For some reason, every time I run studios, it crashed because I added a TextFits if Statment in. Any way I could fix this?
ChatBar.Changed:connect(function()
local YSize = 0
ChatBar.Size = UDim2.new(1, -6, 0, ChatSettings.ChatFontSize + 2)
if ChatBar.TextFits == false then
YSize = YSize + 1
end
ChatBar.Size = UDim2.new(1, -6, 0, (YSize * ChatSettings.ChatFontSize) + ChatSettings.ChatFontSize + 2)
end)

1 comment
Are you sure this is the issue? Try removing that if statement and see if it still crashes, keep the YSize increment part