Mouse position is wrong when using IgnoreGuiInset

When using Mouse.X and Mouse.Y the X is right but the Y is wrong. It seems to be accounting for the topbar. How do I stop this or calculate the size the of the topbar?

could i see the script , it may be because of the script.

Its definitely not the script, when I turn off IgnoreGuiInset on the screen gui it works perfectly. But here’s the code

local player = game.Players.LocalPlayer
local mouse = player:GetMouse()

local f1 = script.Parent.f1

mouse.Move:Connect(function()
	
	f1.Position = UDim2.new(0, mouse.X, 0, mouse.Y) // Y position is off  

end)

Put the size of the gui 1, 0, 1, 0 if you haven’t yet. I feel like this might not work but get it a try.

No clue if this works. I am not that experienced.

Change line 5 to
f1.Position = UDim2.new(0, mouse.X)
f1.Position = UDim2.new(0, mouse.Y)

You can also show your explorer tab with the startergui if you want. Idk if showing a vid would help.

That’s because mouse position doesn’t ignore GuiInset. Why do you need GuiInset ignored?