How would I use Tween Service for changing text size?

I tried this but it errors I feel like its simple I just cant find anything online to help me out.

while true do
			TextCloneTween:TweenSize(UDim2.new(55),Enum.EasingStyle.Sine,1)
			TextCloneTween:TweenSize(UDim2.new(56),Enum.EasingStyle.Sine,1)
			wait(1)
			TextCloneTween:TweenSize(UDim2.new(50),Enum.EasingStyle.Sine,1)
			TextCloneTween:TweenSize(UDim2.new(51),Enum.EasingStyle.Sine, 1)
			wait(1)
		end	

This is my error:
image

I think you need to use this instead, I am not 100% sure but try TextLabel.FontSize, if is not the thing looking for then sorry that is all I know.

Is everything else correct like the TweenSize and everything?

This is my local btw:
local TextCloneTween = Clone.DealPercent.PercentOff

I don’t know, I am new to scripting

Literally just go use TweenService and not the function inherited from UI elements.

local tws = game:GetService('TweenService')
local twinfo = TweenInfo.new(1, Enum.EasingStyle.Sine)

tws:Create(TextCloneTween, twinfo, {TextSize = 100}):Play()

If the text is scaled, then tween the size of the UI element instead with something like {Size = UDim2.new(.5, 0, .5, 0)}

6 Likes