I have a Brick with a ScreenGui with a Button that opens a door
I have a script for it, but it doesn't work.
PlayButton = script.Parent -- (It is a TextButton)
door = PlayButton.Parent.Parent.Door -- (This is the door)
function Play()
door.CanCollide = false
door.Transparency = 0.7
wait(3)
door.CanCollide = true
door.Transparency = 0
end
PlayButton.MouseButton1Down:connect(Play)
This script doesn't work either:
PlayButton = script.Parent -- (It is a TextButton)
door = PlayButton.Parent.Parent.Door -- (This is the door)
function Play()
door.CanCollide = false
door.Transparency = 0.7
wait(3)
door.CanCollide = true
door.Transparency = 0
end
PlayButton.MouseClick:connect(Play)
How do I fix this?
