PERSON WHO HELPS FIX THIS FOR ME GETS SOLUTION 100% GUARANTEED!
I want to make a TextButton become bigger when you hover over it and then when you click on it, the button will become smaller for a second and then bigger (im trying to create an effect where you hover over button it becomes bigger you click on button and it becomes smaller then bigger and when you hover off the button it becomes original size)
i made this that makes the button bigger when hovering over it and smaller when not hovering over it
local TextButton = script.Parent
local OriginalSize = TextButton.Size
local ScaleFactor = 1.05
local TweenTime = 0.1
local function ScaleUp()
local NewSize = UDim2.new(OriginalSize.X.Scale, OriginalSize.X.Offset * ScaleFactor, OriginalSize.Y.Scale, OriginalSize.Y.Offset * ScaleFactor)
game:GetService("TweenService"):Create(TextButton, TweenInfo.new(TweenTime), {Size = NewSize}):Play()
end
local function ScaleDown()
game:GetService("TweenService"):Create(TextButton, TweenInfo.new(TweenTime), {Size = OriginalSize}):Play()
end
TextButton.MouseEnter:Connect(ScaleUp)
TextButton.MouseLeave:Connect(ScaleDown)
but how do i also make this script make the button bigger and then smaller when you click or tap on it?