-
What do I want to achieve? I’d like to first off all, fix my code, I was following a tutorial but I’m unsure how to fix it. This
-
What is the issue? I was following a tutorial but I’m unsure how to fix it. The ButtonPart doesn’t seem to want to work.
-
What solutions have I tried so far? I tried to re watch the tutorial multiple times, it still has not worked unfortunately.
Here’s the code and some photos:
script.Parent.ClickDetector.MouseClick:Connect(function()
script.Parent.Parent.DoorPart.Transparency = 0.7
script.Parent.Parent.DoorPart.CanCollide = false
script.Parent.ButtonPart.BrickColor = BrickColor.Red()
wait(1)
script.Parent.Parent.DoorPart.Transparency = 1
script.Parent.Parent.DoorPart.CanCollide = true
script.Parent.ButtonPart.BrickColor = BrickColor.Green()
end)
Video:
robloxapp-20220115-1234561.wmv (2.7 MB)
When I click on the button, it should be able to open the door for one second and then close automatically but it does not.
Thank you for the help!