Why won't the door move?
Output 15:22:03.117 - Workspace.Model.Script:34: bad argument #2 to '?' (Vector3 expected, got userdata) 15:22:03.118 - Script 'Workspace.Model.Script', Line 34 15:22:03.120 - Stack End
local O = script.Parent.Open
local C = script.Parent.Close
local D = script.Parent.Union
opened = false
function Door()
if not opened then
opened = true
script.Parent.Cog1.Script.Disabled = false
script.Parent.Cog2.Script.Disabled = false
O.Sound:Play()
O.Transparency = 1
C.Transparency = 0
wait(5)
for i = 1, 4600, -0.01 do
D.CFrame = Vector3.new(D.CFrame + CFrame.new(0,i,0))
wait(.01)
end
end
if opened then
script.Parent.Cog1.Script.Disabled = true
script.Parent.Cog2.Script.Disabled = true
C.Sound:Play()
O.Transparency = 0
C.Transparency = 1
wait(5)
for i = 1, 4600, 0.01 do
D.CFrame = Vector3.new(D.CFrame + CFrame.new(0,i,0))
wait(.01)
end
end
opened = false
end
script.Parent.Close.ClickDetector.MouseClick:connect(Door)
script.Parent.Open.ClickDetector.MouseClick:connect(Door)

1 comment
Thank you very much! :)