I've exhausted about every bit of my knowledge with Touched and GetTouchingParts(), so I was looking for some advice. I'm trying to make an elevator game and once the level is complete, the door cannot be closed until every player is inside.
I know I should do something with an invisible part and the Touched thing, but I can't think exactly what I should do so that my code is efficient.
What I was hoping for would be sort of like this (after all the necessary setup of course)
if #PlayersTouchingPart == #Players:GetPlayers() then
CloseDoor() --function for closing door
return
else
return
end
Although I've tried this and I just can't get around it. Any ideas or advice would be appreciated.
Merry Christmas / Happy Holidays!

1 comment
btw this would already be inside another function for the button being pressed and checking the door position and what not