I am making an elevator with a door, and the door has two door panels. canOpen activates the first panel, and canOpen2 activates the second panel. However, when the script is ran, the first panel opens, then the second panel doesn't open until the script has finished running the canOpen script. The script shown below is inside of a bindablefunction. I wonder if there is a way around this. Thanks :)
--ONLY CHANGE IF YOU REALLY KNOW WHAT YOU'RE DOING--
local debounce = false
local canOpen=true
local canOpen2=true
function script.Parent.OnInvoke()
canOpen=script.Parent.Parent.Parent.Parent.Door.DoorOpener:Invoke()
canOpen2=script.Parent.Parent.Parent.Parent.Door.DoorOpener2:Invoke()
end

3 comments
Try using events. Also, why is CanOpen/CanOpen2 local variables and not functions?!
The reason why I put them as local variables is because I can't activate the BindableFunction without making it a variable.
--ONLY CHANGE IF YOU REALLY KNOW WHAT YOU'RE DOING-- Do you know what you are doing though?