I have this snippet
local MousePosition = Services.UserInputService:GetMouseLocation()
local Objects = game.StarterGui:GetGuiObjectsAtPosition(MousePosition.X, MousePosition.Y)
but no matter where my mouse is, it returns a table with nothing?
2 Likes
Server viewport is 0 by 0, and I’d assume the StarterGui uses the server’s viewport. If you’re trying to get GUI’s under the mouse on the current player’s screen you probably want to use PlayerGui:GetGuiObjectsAtPosition(x, y)
, not StarterGui:GetGuiObjectsAtPosition()
3 Likes
Thanks, that worked (Even when it didn’t work before)
2 Likes