Hi everyone, I am trying to add an effect to a button in game that, when you press it, gets a tiny bit smaller and then goes back to its normal size (this is 100% just for effects). The things is, when I resize the button, it gets smaller but to the top left side corner. I would like it to get smaller on itself (centered). This is kinda hard to understand but its the best I can do… It’s as if its center of gravity was on the left top corner whereas I want it on the center. Here is my code.
local function resetStats()
game.ReplicatedStorage.ResetStats:FireServer()
script.Parent:TweenSize(UDim2.new(0.30, 0,0.059, 0), "In", "Linear", 0.1)
wait(0.1)
script.Parent:TweenSize(UDim2.new(0.33, 0,0.089, 0), "In", "Linear", 0.1)
end
script.Parent.Activated:Connect(resetStats)