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)
The H1 is a part ,l place at: Workspace>Model>Model>H1(Part)
On your connection line you have script.Parent.Parent.Touched
. Is script.Parent.Parent
the part 'H1'? Thescript.Parent.Parent
in your code snippet declares which part triggers the touched event. If that was your problem, here is the fix.
local part = game.Workspace.Model.Model.H1 -- Put the location of the part 'H1' here part.Touched:connect(function(hit) if script.Parent.Parent.DoorL.Value == false then script.Parent.Parent.DoorL.Value = true wait(60) script.Parent.Parent.DoorL.Value = false end end)