Which side of the screen, part is on?

Hello! I’ve got a question. So as long as i know, we can get the part position on screen using Camera:WorldToScreenPoint. I was wondering that how can we know if a part on which side of the screen like the example i gave below?

You can use the value of the screen size (presented as offset) to figure out which is which. For example, the one you want is Right bottom. You would check to see if the position of Camera:WorldToScreenPoint is greater than 50% of the screen size in the x and y directions.

I think for screen size, you can use the code below:

local mouse = player:GetMouse()
x = mouse.ViewSizeX
y = mouse.ViewSizeY
1 Like

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