function onTouched(hit) if hit.Name == "H1" then if script.Parent.Parent.DoorL.Value == false then script.Parent.Parent.DoorL.Value = true wait(60) script.Parent.Parent.DoorL.Value = false end end script.Parent.Parent.Touched:connect(onTouched)
You are missing an end. You need an end for the function and one for each of the if statements.
function onTouched(hit) if hit.Name == "H1" then if script.Parent.Parent.DoorL.Value == false then script.Parent.Parent.DoorL.Value = true wait(60) script.Parent.Parent.DoorL.Value = false end end end script.Parent.Parent.Touched:connect(onTouched)