:GetGuiObjectsAtPosition returns boolean values

Right now I’m using the https://developer.roblox.com/en-us/api-reference/function/BasePlayerGui/GetGuiObjectsAtPosition function to get the GuiObjects on the mouse position. Here is what I’m doing:

local guisOnPos = player.PlayerGui:GetGuiObjectsAtPosition(clickPos.X, clickPos.Y)
for i, guiObjectOnMouse in pairs(guisOnPos) do

It’s working but there is a weird problem. The function is supposed to return a table of the objects that are on the position given, but instead it gives me boolean values. So it’s just printing “true”. Anyone know why this is happening? Is it a bug or am I doing something wrong?

1 Like

I make this kind of mistake all the time.

Your printing draggingGui, not guiObjectOnMouse.


OH LOLL. I rewrote it 3 times and still didn’t see this wow.