01 | local powerbutton = script.Parent.Parent |
02 | local screen = workspace.screen |
03 |
04 | if script.Parent.MouseClick:Connect( function () |
05 | screen.Decal.Texture = "rbxassetid://4495566781" |
06 |
07 | if script.Parent.MouseClick:Connect( function () |
08 | screen.Decal.Texture = "rbxassetid://1396604525" |
09 | end ) |
10 | end |
I have this. Where it says if script.Parent.MouseClick:Connect(function() screen.Decal.Texture="rbxassetid://1396604525"
I want that to be what happens once the ClickDetector (script.Parent) is clicked again.
Im not sure if you want the decals to change only once or for it to repeat.
01 | local decalnumber = 1 |
02 | script.Parent.MouseClick:Connect( function () |
03 | if decalnumber = = 1 then |
04 | decalnumber = 2 |
05 | screen.Decal.Texture = "rbxassetid://1396604525" |
06 | elseif decalnumber = = 2 then |
07 | decalnumber = 1 |
08 | screen.Decal.Texture = "rbxassetid://1396604525" |
09 | end |
10 | end ) |
This should repeat the decals back and forth every time it is clicked.