This is the function I use to show a tool tip when hovering over an item. The problem is all my items are really packed together (2 pixels gap between each) so when you leave one slot and into the next, it can sometimes fire the Start function before the leave function, thus causing the tool tip to disappear
function Hover.Start(slot, input)
if slot.Container.Item.Value == "" then return end
SetupBox(slot)
HoverBox.Position = UDim2.new(0, Mouse.X + 20, 0, Mouse.Y + 40)
HoverBox.Visible = true
end
function Hover.Stop(input)
if input.UserInputType ~= Enum.UserInputType.MouseMovement then return end
-- Set invisible
HoverBox.Visible = false
end
slot.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseMovement then
Hover.Start(slot, input)
end
end)
slot.InputEnded:Connect(Hover.Stop)
I also tried putting a wait() at the start of the Start function, however that can still cause problems, where if I quickly pass through all the slots and out then out, the tool tip stays