Hello everyone,
I’m trying to make hover animation on frames but the tween is too slow and laggy
Client Script
local RegularFrame = script.Parent.Regular
local PremuimFrame = script.Parent:WaitForChild("Premuim")
local VIPFrame = script.Parent:WaitForChild("VIP")
local TweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(0.5)
local FrameEnter = Color3.new(0.67451, 0.45098, 0)
local FrameLeave = Color3.new(1, 0.666667, 0)
local Frames = {RegularFrame,PremuimFrame,VIPFrame}
for i, frame in pairs(Frames) do
frame.MouseEnter:Connect(function()
local tween = TweenService:Create(frame, tweenInfo, {BackgroundColor3 = FrameEnter})
tween:Play()
end)
frame.MouseLeave:Connect(function()
local tween = TweenService:Create(RegularFrame, tweenInfo, {BackgroundColor3 = FrameLeave})
tween:Play()
end)
end
Video (GIF): https://gyazo.com/ad48f39f0122f0c5bc88ce4a035fc59c
Thanks for reading…