I am scripting an elevator and because of crappy lighting system I have two choices: no light inside the elevator or light clipping outside the elevator. BUT there may be another way - if someone looks inside the elevator, the light will locally activate for the player that looks on it. But how- no, is it possible to do that?
✓ ANSWER ACCEPTED
Is it possible to detect if player is looking at part?
3 answers
✓ Accepted answer
If you want to see if it is at all visible from the player's camera, try: http://wiki.roblox.com/index.php?title=API:Class/Camera/WorldToScreenPoint
I'm not sure but you might be able to do it by placing an invisible, collisionless part over the entrance of the elevator and use the mouse hover enter function (https://wiki.roblox.com/index.php?title=API:Class/ClickDetector/MouseHoverEnter)?
1 comment
0
yeah but my elevator uses clickdetectors for buttons, also the doors are manual so it might get confusing
That is not possible, im afraid.
2 comments
0
yes it is
0
it is
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
i would test moving the lights to local parts.
ye i am going to test avigant's technique of detecing parts on screen and then locally lighting the elevator up