The Scripts are supposed to function for the Gate but they are just functioning for the buttons with the Scripts and ClickDetectors in them.
Opening Button Script
local Gate = script.Parent
local Click = Gate.ClickDetector
local function OpenGate()
Gate.Transparency = 1
Gate.CanCollide = false
end
Click.MouseClick:connect(OpenGate)
Closing Button Script
local Gate = script.Parent
local Click = Gate.ClickDetector
local function CloseGate()
Gate.Transparency = 0
Gate.CanCollide = true
end
Click.MouseClick:connect(CloseGate)

1 comment
I edited my answer, try it again..