local Open = false
Admins = "alerttrains123","Player1"
function Click()
wait()
if Click.Parent:findFirstChild("Humanoid") then
for i = 1,#Admins do
if Click.Parent.Name == Admins[i] then
if Open == false then
Open = true
script.Parent.Parent.DoorO1.Transparency = "0"
script.Parent.Parent.DoorO2.Transparency = "0"
script.Parent.Parent.DoorO1.CanCollide = true
script.Parent.Parent.DoorO2.CanCollide = true
script.Parent.Parent.DoorC1.Transparency = "1"
script.Parent.Parent.DoorC2.Transparency = "1"
script.Parent.Parent.DoorC1.CanCollide = false
script.Parent.Parent.DoorC2.CanCollide = false
elseif Open == true then
Open = false
script.Parent.Parent.DoorO1.Transparency = "1"
script.Parent.Parent.DoorO2.Transparency = "1"
script.Parent.Parent.DoorO1.CanCollide = false
script.Parent.Parent.DoorO2.CanCollide = false
script.Parent.Parent.DoorC1.Transparency = "0"
script.Parent.Parent.DoorC2.Transparency = "0"
script.Parent.Parent.DoorC1.CanCollide = true
script.Parent.Parent.DoorC2.CanCollide = true
end
end
end
end
end
script.Parent.ClickDetector.MouseClick:connect(Click)
I took part of this script from somebody else and tried to implement it with mine, sadly the door will not open when I click it

3 comments
You appear to be missing an argument in the Click function. What does the output print when you run the script?
when I click the button it states: 17:32:38.762 - Stack Begin 17:32:38.765 - Script 'Workspace.Door.Click.Script', Line 5 17:32:38.767 - Stack End
before the stack started it gave me: 17:32:38.760 - Workspace.Door.Click.Script:5: attempt to index global 'Click' (a function value)