When I keep hovering on my frames, the tweens eventually stop working unless I move my mouse outside really far. Does anyone know how to fix this?
Here is the script that I’ve written. Apologies if this is a repeated topic, I didn’t know what to call this behavior, and just searching “ui tween not working correctly” doesn’t exactly result in what I want.
ClonedFrame.MouseEnter:Connect(function()
local info = TweenInfo.new(0.2, Enum.EasingStyle.Linear, Enum.EasingDirection.In)
local Shadow = ClonedFrame.Shadow
local tween = TS:Create(Shadow, info, {Transparency = 0.3})
local textTween = TS:Create(Shadow.Price, info, {TextTransparency = 0})
Shadow.Price.Text = modelConfigs.Price.."$"
local textTween2 = TS:Create(Shadow.Prestige, info, {TextTransparency = 0})
Shadow.Prestige.Text = "Prestige: "..modelConfigs.Prestige
Shadow.Visible = true
tween:Play()
textTween:Play()
textTween2:Play()
end)
ClonedFrame.MouseLeave:Connect(function()
local info = TweenInfo.new(0.4, Enum.EasingStyle.Linear, Enum.EasingDirection.Out)
local Shadow = ClonedFrame.Shadow
local tween = TS:Create(Shadow, info, {Transparency = 1})
tween:Play()
tween.Completed:Connect(function()
Shadow.Visible = false
end)
end)