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

Is it possible to detect if player is looking at part?

Asked by
NsNidPL 41
6 years ago

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?

0
i would test moving the lights to local parts. User#5423 17 — 6y
0
ye i am going to test avigant's technique of detecing parts on screen and then locally lighting the elevator up NsNidPL 41 — 6y

3 answers

Log in to vote
2
Answered by
Avigant 2374 Moderation Voter Community Moderator
6 years ago

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

Ad
Log in to vote
0
Answered by 6 years ago

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)?

0
yeah but my elevator uses clickdetectors for buttons, also the doors are manual so it might get confusing NsNidPL 41 — 6y
Log in to vote
-1
Answered by 6 years ago

That is not possible, im afraid.

0
yes it is Avigant 2374 — 6y
0
it is GingeyLol 338 — 6y

Answer this question