I have a GUI where each time I hover over a button, it highlights it by creating a little bar beneath it, which gets removed when the mouse leaves, however if you spam wipe your mouse over all the buttons, the bar sometimes stays.
https://gyazo.com/895f9844329d794c111d04d5e0218566
The code which handles the creation and tweening,
local options = script.Parent.Options
for i,v in pairs(options:GetChildren()) do
if v.Selectable == true and v:IsA("TextButton") then
v.MouseEnter:Connect(function()
print(v.Name)
frame = Instance.new("Frame")
frame.Visible = false
frame.Parent = options
frame.Size = UDim2.new(0, 0,0.015, 0)
frame.BackgroundColor3 = Color3.fromRGB(255,255,255)
frame.BorderSizePixel = 0
frame.Position = UDim2.new(0.191,0,v.Position.Y.Scale + 0.13,0)
frame.Visible = true
frame:TweenSize(UDim2.new(0.645,0,0.015, 0),"Out","Linear",0.3)
end)
v.MouseLeave:Connect(function()
frame:Destroy()
end)
end
end
How can I add to my code to make sure that this doesn't occur? Thanks.

4 comments
Ok I made the frame that was being created be named (v.Name.."-Frame") and each time I ran the MouseEnter event I'd check if (v.Name.."-Frame") already existed, and if it did, I made the script delete it. Please still feel free to answer or comment with alternative solutions.
i guess i was too late
I would use TweenService for any new work. It has parameters built it to prevent this, unlike :TweenSize / :TweenPosition / :TweenSizeAndPosition
https://developer.roblox.com/en-us/api-reference/function/TweenService/Create here the link for an example at TweenService