So I have a line of code that collects the ui's that the mouse is hovering over. What it does is it creates a table that contains the ui's it found on the mouse pos. This works when I hover something that isn't inside or is a scrolling frame however when I fire the function while holding over the scrolling frame it returns nil
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local function getuimouse()
print(mouse.X, mouse.Y)
return player.PlayerGui:GetGuiObjectsAtPosition(mouse.X, mouse.Y)
end
This gif demonstrates the problem https://gyazo.com/a38b8814965d4decbe9e13446efcf392

2 comments
Wait it seems to work but mouse.Button2Down:connect(function() does not fire while hovering over a scrolling frame
Alright I instead used userinputservice and the issue is fixed. Mouse events don't work on scrolling frames