Hey! So I know I can use WorldToScreenPoint to check whether or not a Part is visible, and the position of it in 2D, but how would I manage to know if that Part is inside a circle on my screen?
Image:
https://i.gyazo.com/1e6404851183b4564322c35cfcf5ec8c.png
I don't want full script, I just need the calculation.
Try using .magnitude. Take the position of the center of the circle and the position of the part and see if the magnitude is equal to or less than a certain number. Ex:
local Part = game.Workspace.Part local MiddleOfCircle = game.Workspace.Circle.Position local Radius = 15 -- Just an example Part.Changed:Connect(function() local Magnitude = (MiddleOfCircle - Part.Position).Magnitude if Magnitude <= Radius then Part.Transparency = 0 else Part.Transparency = 1 end end)