I'm basically trying to make a simple door opening script that is activated by a gui Button, though the actual script doesn't work and gives an error that says: "Union is not a valid member of Part"
I've tried separating the union and it still wouldn't work. If anyone can help I'd be very happy :)
Script:
local dooropen = workspace.G1.Door.Open.Union
local doorclosed = workspace.G1.Door.Closed.Union
function Click(mouse)
if doorclosed.Transparency == 0 then
doorclosed.Transparency = 1
doorclosed.CanCollide = false
dooropen.Transparency = 0
dooropen.CanCollide = true
else
doorclosed.Transparency = 0
doorclosed.CanCollide = true
dooropen.Transparency = 1
dooropen.CanCollide = false
end
end
script.Parent.MouseButton1Down:connect(Click)

2 comments
May I see a picture of how your model is layed out
https://imgur.com/tdVfMtv