Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Converting 3D Position/CFrame to 2D screen coordinate?

Asked by 6 years ago

So basically, I'm creating a sort of like, enemy indicator when people shoot more than 3 bullets in quick succession. I'm very stumped - could anyone please help me figure out the logic to put a 4x4 pixel frame at the center and slightly above a players head position? It's a ScreenGui (and needs to be for some reasons, because Surface's wont work well for this as they just stick to a part and Billboard's rotate with the camera).

I tried something similar to:

frame.Position = UDim2.new(0, head.Position.X, 0, head.Position.Y);

But it epicly failed. I just need some help figuring out the logic; I can implement the rest. Thanks in advance!

Answer this question