So basically, the script is about when a player steps on a part called Button, a message appears, dissapears, and the door opens, stays open for 10 seconds, and closes again. Is this right?
Message on touch script
local debounce = true
function onTouch(Part)
if debounce and Button.Parent:FindFirstChild("Humanoid") and Button.Parent.Name == game.Players:findFirstChild(Button.Parent.Name) then debounce = false
function onTouch(Part)
Instance.new("Message", game.Workspace.Part)
wait()
H.Message.Text("You can pass.")
end
script.Parent.Touched:connect(onTouch)
Door script
H = game.Workspace.Door
function onTouch(Button)
wait(5)
H.CanCollide = false
H.Transparency = 1
wait(10)
H.CanCollide = true
H.Transparency = 0
end
script.Parent.Touched:connect(onTouch)

1 comment
What's the error?