https://gyazo.com/61639ac3c4ccfc817564b97589918213
MouseEnter, MouseLeave be leaving the gui kinda laggy does anyone have a way against this?, heres is the source
local tweenservice = game:GetService('TweenService')
local t = {}
t.__index = t
t.db = false
t.db2 = false
local self = setmetatable({}, t)
for i, v in pairs(script.Parent:GetChildren()) do
if v:IsA("TextButton") then
v.MouseEnter:Connect(function()
if self.db == false then
self.db = true
--[[
v.TextColor3 = Color3.new(1, 0.976471, 0.615686)
print(Color3.fromHex("#fbffe9"))
v.TextSize = v.TextSize + 5
]]--
self.goal = {
TextSize = v.TextSize + 5,
TextColor3 = Color3.new(1, 0.976471, 0.615686)
}
self.info = TweenInfo.new(
.5,
Enum.EasingStyle.Sine,
Enum.EasingDirection.In,
0,
true,
0
)
local tween = tweenservice:Create(v, self.info, self.goal)
tween:Play()
wait()
self.db = false
end
end)
v.MouseLeave:Connect(function()
if self.db2 == false then
self.db2 = true
self.goal2 = {
TextColor3 = Color3.new(1, 1, 1),
TextSize = v.TextSize - 5,
}
self.info2 = TweenInfo.new(
.5,
Enum.EasingStyle.Sine,
Enum.EasingDirection.In,
0,
false,
0
)
local tween = tweenservice:Create(v, self.info2, self.goal2)
wait()
self.db2 = false
end
end)
end
end
thanks.