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

Roblox - how to make when i click button tv program turn on?

Asked by 3 years ago
Edited 3 years ago

How can I do that when I click this yellow button, the program will appear and the program's sound will start to play, and when I click the button again, the program will turn off and the program sound will stop playing and so on. The name of the TV is Old TV, the name of the sound is sound and the decal name of the program is TV Program.

photos : https://imgur.com/a/qNLG9r7

1 answer

Log in to vote
0
Answered by
spectsy 16
3 years ago
Edited 3 years ago

I think that you should make two functions: one of them closes the tv and another turns it on. Then listen for the click and fire the turn on function. For the turn on function you play the sound, the image/decal and whatever else you want to do, and for the turn off function you just remove the other things or just move them to repstorage. Make sure to make a bool var which says if the tv is on or off, and when you press the button, add an if statement which determines which function to fire

0
also make sure to switch the var when you fire the functions spectsy 16 — 3y
0
and if you want another script to listen if the tv is on, then you need to make a boolean value spectsy 16 — 3y
Ad

Answer this question