local ogSize = script.Parent.Size
local duration = 0.1
local button = script.Parent
local text = button.Text
local TweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(duration, Enum.EasingStyle.Bounce, Enum.EasingDirection.InOut)
local tween1 = TweenService:Create(button.Text ,tweenInfo,{TextSize = 50})
Also getting an error: 00:09:56.358 Unable to cast value to Object - Client - LocalScript:7
I have checked other topics but none have proved successful so far.
you are tweening the text of the button, not a property of a button
on line 7 (last line) you set the object of the tween to the text of the button
correct code:
local ogSize = script.Parent.Size
local duration = 0.1
local button = script.Parent
local text = button.Text
local TweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(duration, Enum.EasingStyle.Bounce, Enum.EasingDirection.InOut)
local tween1 = TweenService:Create(button,tweenInfo,{TextSize = 50})
i added all of those things, and it still works perfectly fine. even if you did not have those in, it would make no difference except for looks
edit: if you just want the text to scale with the button then just turn on textScaled and add a UIpadding to the button so the text does not go up to the edge