local Open = false
local Joe = script.Parent.Parent.Close:GetChildren()
local Bob = script.Parent.Parent.Open:GetChildren()
function Click ()
if Open == false then
if Joe.name == "Part" then
Joe.Transparency = 1
Joe.CanCollide = false
end
if Joe.name == "Window" then
Joe.Transparency = 1
Joe.CanCollide = false
if Bob.name == "Part" then
Bob.Transparency = 0
Bob.CanCollide = true
end
if Bob.name == "Window" then
Bob.Transparency = 0.5
Bob.CanCollide = true
end
end
Open = true
elseif Open == true then
if Joe.name == "Part" then
Joe.Transparency = 0
Joe.CanCollide = true
end
if Joe.name == "Window" then
Joe.Transparency = 0.5
Joe.CanCollide = true
end
if Bob.name == "Part" then
Bob.Transparency = 1
Bob.CanCollide = false
end
if Bob.name == "Window" then
Bob.Transparency = 1
Bob.CanCollide = false
end
Open = false
end
end
script.Parent.ClickDetector.MouseClick:connect (Click)
I click the button and the output shows nothing, this script it also not working, first time trying the GetChildren() function so I hope that's the problem. The function is supposed to find two doors, both having two separate windows in them. When the button is clicked it's supposed to open the door.

1 comment
thank you sooo much, this helps a lot