local hovercolor = Color3.fromRGB(75, 75, 75)
for i,v in pairs(script.Parent:GetChildren())do
if v:IsA("TextButton")then
local origsize = v.Size
local frame = Instance.new("Frame")
frame.BackgroundColor3 = hovercolor
frame.Size = UDim2.new(0,v.Size.X.Offset,0,0)
frame.Position = UDim2.new(0,v.Position.X.Offset,1,0)
frame.AnchorPoint = Vector2.new(0,1)
frame.BorderSizePixel = 0
frame.Name = v.Name.."HoverOver"
frame.ZIndex = 2
frame.Parent = v.Parent
v.MouseEnter:Connect(function()
frame:TweenSize(UDim2.new(0,origsize.X.Offset,0,origsize.Y.Offset),Enum.EasingDirection.In,Enum.EasingStyle.Exponential,1,true)
end)
end
end
I haven’t scripting the mouseleave yet; its not the problem. The problem is when the mouse enters, after the tweendelay, it instantly shows up.