Contnt.Changed:connect(function(prop)
if prop == 'Text' then
local oldSize = Contnt.Size
Contnt.Size = UDim2.new(1,0,0,999)
local newSize=Contnt.TextBounds.Y
Contnt.Size=oldSize
Contnt:TweenSizeAndPosition( UDim2.new(1,0,0,newSize), UDim2.new(0,0,.5,-(newSize/2)), Enum.EasingDirection.Out,Enum.EasingStyle.Quad,1,true)
end
end)
So I am making a console (kind of a command bar for admin scripts), that I want to have expand when a user types that would then cause a new line to form. I am having the TextBox indicate that it is being changed in some form, if that change is Text, then the if then statement should run.
Problem is, this has been causing me to noticeably lag when I have to get out of Roblox Player. What I want the script to do is get the old size, that way it can tween more appealingly. Then when it gets that old size, expand the textbox long enough to get a new size to fit the TextBounds, and go back to the old size. I then want the script to Tween from the Old size to the new size.
I have tried various ways to keep the script from lagging me and to get it to work properly, yet am running out of options. Anyone got any ideas?
Thank you in advanced.

2 comments
1st this should be a localscript (just checking) 2nd you could reduce the transition time from 1 to somthing like 0.02 Hope this helps
@kingdom5, yeah, no it definitely does not...