How do I script a Tv's on and off button?
01 | script.Parent.ClickDetector.MouseClick:connect( function (Onclick) |
02 | script.Parent.BrickColor = BrickColor.new( "Medium stone grey" ) |
03 | script.Parent.CFrame = CFrame.new( 68.869 , 78.81 , - 458.99 ) |
04 | script.Parent.Parent.Parent.Screen.ScreenFace.BrickColor = BrickColor.new( "Institutional white" ) |
06 | script.Parent.BrickColor = BrickColor.new( "Institutional white" ) |
07 | script.Parent.CFrame = CFrame.new( 68.869 , 78.81 , - 459.04 ) |
11 | script.Parent.ClickDetector.MouseClick:connect( function (onclick) |
12 | if script.Parent.Parent.Parent.Screen.ScreenFace.BrickColor = = BrickColor.new( "Institutional white" ) |
13 | then script.Parent.Parent.Parent.Screen.ScreenFace.BrickColor = BrickColor.new( "Really black" ) |
I'm trying to make it so every other time the tv's power button is clicked, then it'll turn off.
I've tried using elseif, but it says I have to close off a script, even though it's already closed off.
Help would be great. =u='
((Strangely, the output isn't saying anything..))