Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

how to place a screen gui on a part with raycasting?

so this is simple so i want to have a raycast hit something then a screen gui is positioned where it hit i have been working on that for a while and i dont know if there is a simple way to do it or the "math" way also no putting it on a part and welding it to the place so what i want is for you to tell me if there is an easy way and tell me how or wish me luck :/

1 answer

✓ Accepted answer

You could use WorldToScreenPoint or WorldToViewportPoint if you want to ignore gui inset. This will return the exact X and Y position on your screen relative to the Vector3 provided.

1 comment

0

the screen gui will be in a part does it still work in a part?

This discussion is preserved as it was. New answers, comments, and votes are closed.