I'm making a chat gui, and I'd like to be able to have a small chat bar, however if you type more than the chatbar's length, it gets bigger according to text length. This would work pretty much like the apocalypse rising chat.
How would I do this?
Thank you!
http://wiki.roblox.com/index.php?title=API:Class/TextBox
TextBox has a property that checks if your text fits. So based on this you can do something along these lines.
(Note: Written away from studio, not guaranteed to work 100%)
local box = script.Parent local lastSize = 0 local boxMin = 75 spawn(function() while wait(0.01) do if box:IsFocused() then if not box.TextFits then box.Size = box.Size + UDim2.new(0,8,0,0) end if string.len(box.Text) < lastSize then if box.Size.X.Offset > boxMin then box.Size = box.Size - UDim2.new(0,6,0,0) end end end lastSize = string.len(box.Text) end end)