-
What do you want to achieve? Keep it simple and clear!
I want to achieve by hovering a button that this hovered button sizes out centered -
What is the issue? Include screenshots / videos if possible!
the issue is that when i hover a button it doesnt sizes out CENTERED:
-
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
Devforum, and I found out that you can user something called AnchorPoint, no clue tho how to use it
Here is the local script (which works fine):
for i,v in pairs(GameGUI:GetChildren()) do
if v:IsA("ImageButton") then
local PreviousSize = v.Size
local TweenSize = v.Size + UDim2.new(Increase,Increase,Increase)
local EnterTween = TweenServivce:Create(v,info,{Size = TweenSize})
local LeaveTween = TweenServivce:Create(v,info,{Size = PreviousSize})
v.MouseEnter:Connect(function()
LeaveTween:Destroy()
EnterTween:Play()
v.MouseLeave:Connect(function()
EnterTween:Destroy()
LeaveTween:Play()
end)
end)
v.MouseButton1Click:Connect(function()
LeaveTween:Play()
wait(0.1)
EnterTween:Play()
end)
end
end
any help appreciated!