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

How to make script that turn off lights and then player needs to turn lights on?

Asked by 2 years ago
Edited 2 years ago

Hi, I have no issues. But I need an event script that turns off the lights once every 50 seconds and the player has to turn the lights back on via the proximityprompt otherwise he will die.

0
I need this script for a horror game. I would appreciate help. I just need a PointLight that turns itself off in 50 seconds (no matter what time) and then the player has to turn on the lights manually and will have about 15 seconds. If he doesn't complete his quest, he will die. I'll do a powerbox in the room where I need the proximityprompt to appear every 50 seconds so the player can fix it. oldmantv12345 9 — 2y

1 answer

Log in to vote
0
Answered by 2 years ago

Well this website is not here to make scripts for you, but i could get you on the right track:

make a while true do script that makes the pointlight value 0 and wait 50 seconds at the end...

next, create another script which detects a change in value of pointlight : GetPropertyChangedSignal()

then, use if statements to detect whether the light has been turned on or off and in the off statement create a proximity prompt that if pressed makes the pointlight value back to what you set it. and also fire a remote event that start a countdown.

If the if statement checks if it is on, stop the countdown by firing another event

May be complicated but u do want this so yeah

Hope this helped

0
But i am not scripter… On YT there are no tutorials so only you can help please :( oldmantv12345 9 — 2y
0
All I need is a script that turns off the lights every 50 seconds and the player will have to turn them on manually via the proximityprompt will only have 15 seconds to do so if he doesn't turn them on he will die. And immediately the script resets so it will have 50 seconds again to check the cameras and watch the monster that moves there. And like this all the time. I already have a monster. oldmantv12345 9 — 2y
Ad

Answer this question