InputObject.Position returns incorrect position

This is a Frame that I am detecting the player’s input on. When I click the top left of the frame, it returns a negative y value. THIS SHOULD BE IMPOSSIBLE because the top left of the frame is 0, 0. Am I misinformed? Am I going crazy? Why does this return a y value of around -50 when its supposed to be 0 at the top left corner of any UI element

_UI.MoreInfo.InputBegan:Connect(function(input)

	local relative = input.Position
	
	print(relative)
	
end)

Y value at top left of UI element. (Should never be negative)
image

Could I be overlooking something?

Does your screen gui have the “IgnoreGuiInset” property ticked?

I think that the 0,0 point is the top left when this isn’t ticked. Therefore, if it is ticked and the gui’s size is greater on the Y, then the Y at the new top left point is going to be less (as y increases going down)

Here’s what I mean

IgnoreGuiInset not ticked:

IgnoreGuiInset ticked

I was getting similar results to you, about -50 on the Y, but according to this post: Thickness of topbar the topbar should be 36 pixels, so not sure why we’re both getting 50

I’m not an expert on UI though.

Oh I see why its doing that now, thanks!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.