How could I script a UV light to where you look closer to a block it slowly appears?

So, me and my friend decided to work on an Escape Room similar to Roblox’s Escape Room made by DevUltra. I am someone in their Discord Server where they would post ideas, etc… Then I came across a post by DevUlta of him showing us one of my ideas that I was trying to achieve which were to make a UV light and script it successfully. In this video clip, it shows DevUltra aiming his camera with the UV light at a brick and it slowly appears when you look closer to it and slowly fades when you look away.

Video: https://gyazo.com/e341aee7255d1de97aee66ca65be6ae9

How would I be able to achieve this function of where the player is looking toward the block with a UV light??

1 Like

i mean if its in first person u could do somthing with mouse.hit

Nah, but it should still be eligible to work in both 3rd and 1st person.

then its probably lookvector , sadly im not to familiar with it but it should help

I’l suggest putting a blue fog around the player