Switching items fast and hover menu cant keep up

Hi, so basically I have this hover gui for items and when I switch items fast, the hover gui doesnt work.
Example of issue:

My Code:

local screenGui = script:FindFirstAncestorOfClass("ScreenGui")
local frame = script.Parent
local players = game:GetService("Players")
local player = players.LocalPlayer
local mouse = player:GetMouse()



mouse.Move:Connect(function()
	local inv = player.PlayerGui.test.Main.ScrollingFrame:GetDescendants()
	for i,v in inv do
		if v:IsA("TextButton") then
			v.MouseEnter:Connect(function()
				frame.AD.Text = v.AP.Value.." Attack Power"
				frame.AP.Text = v.MP.Value.." Magic Power"
				frame.NameText.Text = v.WEAPONNAME.Value
				frame.Rarities[v.RARITY.Value].Visible = true
				frame.Sell.Text = v.SELL.Value
				frame.ImageLabel.Image = v.Weapon.Image
				frame.Visible = true
				
				game:GetService("RunService").RenderStepped:Connect(function()
					local location = game:GetService("UserInputService"):GetMouseLocation()
					script.Parent.Position = UDim2.new(0, location.X + 5, 0, location.Y - 31)
				end)
				
				v.MouseLeave:Connect(function()
					frame.Visible = false
					for i, v in frame.Rarities:GetChildren() do
						v.Visible = false
					end
				end)

			end)
		end
	end
end)

Appreciate any help!

1 Like

I’m pretty sure that if two GUI objects are near each other and you hover from one of them to the other; the touched event doesn’t fire for the other one. So maybe try increasing the padding and try it again.

Its perfectly padded tho :sob:
(word limit idk why lol)

Well, I don’t really know, the layout is nice but sometimes you gotta sacrifice stuff. Unless you think this isn’t a big deal, you might have to increase the padding… :sweat_smile: