I made a script where when you click on the door it opens, but it won't work and also I can't tell whats wrong since nothing is showing up on the output about it
Here is the script
Door = script.Parent.Main:GetChildren()
value = script.Parent.value
value.Value = 0
function onClick()
if value.Value == 1 then return end
value.Value = 1
for loop = 1,190 do
Door.CFrame = Door.CFrame * CFrame.new(0,0,0.32) * CFrame.fromEulerAnglesXYZ(0, -0.1, 0)
wait(0)
end
wait(3)
for loop = 1,190 do
Door.CFrame = Door.CFrame * CFrame.New(0,0,-0.32) * CFrame.fromEulerAnglesXYZ(0, 0.1, 0)
wait(0)
end
wait(.1)
value.Value = 0
end
script.Parent.ClickDetector.MouseClick:connect(onClick)
Can someone tell me what i did wrong?

2 comments
At first i didn't get any error in the output but now that i changed New to new i got "18:52:28.742 - Workspace.Door.Script:12: bad argument #1 to '?' (CFrame expected, got nil)"
I made a new change and now nothing is showing up in the output again, i posted the new change below