Why isn't my door open/close button working?

hello, im new to scripting and im trying to make a door with an open button and a close button here are my scripts
OpenButton:

local Open = script.Parent
local Close = game.Workspace.Close
local Door = game.Workspace.Door

Open.ClickDetector.MouseClick:Connect(function()
Door.Transparency = 1
Door.CanCollide = false
end).

CloseButton:

local Open = script.Parent
local Close = game.Workspace.Close
local Door = game.Workspace.Door

Close.ClickDetector.MouseClick:Connect(function()
Door.Transparency = 0
Door.CanCollide = true
end)
there :slight_smile:

Could you tell us the error? (30 chars lololol)

That’s the funny part it didn’t give me an error?

is all that code in one script?

Make sure it’s not a local script, if it is then keep it somewhere it’ll work; like where it is a descendant of StarterPlayerScripts

code in local scripts does not run when the script is in workspace

That’s why, it’s a localscript