Guys I have a problem.
local doubledoor = script.Parent.Parent
local door1 = doubledoor.Doors.Door1.Mainframe
local door2 = doubledoor.Doors.Door2.Mainframe
local click = script.Parent.ClickDetector
local IsOpen = false
function OpenDoor()
for i = 1,45 do
door1.CFrame = door1.CFframe * CFrame.new(0,0,0.08) * CFrame.fromEulerAnglesXYZ(0,0,0)
wait()
end
end
script.Parent.ClickDetector.MouseClick:connect(function()
OpenDoor()
end)
The script is supposed to make a door open. But everytime I click the button to open it the output says:
Stack Begin 16:40:03.619 - Script 'Workspace.DoubleDoor.Button.Script', Line 9 - global OpenDoor 16:40:03.620 - Script 'Workspace.DoubleDoor.Button.Script', Line 14 16:40:03.621 - Stack End WHY IS THIS HAPPENING!!

2 comments
I used Remove Events to make the 2 doors move at the same time. But, do you know how to make them move FASTER? I'm afraid if I remove the wait I will crash.
And also how to make em move with multiple parts. SetPrimaryPartCFrame doesn't help.