Moving Brick Button [Help Needed]?
Basically I just need help on the part of the code where the block will return I have it set to wait 2 seconds then it will move back by it's self, but I want it to move back once I click the button again. Could I get some help please? Thanks!
06 | print ( "Moving Brick To Right" ) |
07 | script.Parent.Parent.DoorButton.BrickColor = BrickColor.new( "Really red" ) |
09 | script.Parent.Parent.Door.CFrame = script.Parent.Parent.Door.CFrame * CFrame.new( 0 , 0 , 0.244 ) * CFrame.fromEulerAnglesXYZ( 0 , 0 , 0 ) |
15 | script.Parent.Parent.DoorButton.BrickColor = BrickColor.new( "Lime green" ) |
16 | print ( "Moving Brick To Left" ) |
18 | script.Parent.Parent.Door.CFrame = script.Parent.Parent.Door.CFrame * CFrame.new( 0 , 0 , - 0.244 ) * CFrame.fromEulerAnglesXYZ( 0 , 0 , 0 ) |
24 | script.Parent.ClickDetector.MouseClick:connect(onClicked) |