If you have an answer, please comment. If you want to help, please comment that you want to help.
I really want to get this done. I hope you can help in some way! Thanks! WE.
What you could do to count the players is have 2 bricks, one on the outside, and one on the inside. When a player touches the outside brick, it teleports them in the elevator and adds +1 to a value that is stored inside the elevator, (or elsewhere). Then the brick on the inside will teleport them out and subtract 1 from the value.
This is a pretty clunky solution but should work fine once implemented. It should look like this -
For detecting once the elevator is actually full, you could just run a script constantly to check the value of the player count. Once it reaches a certain number, it could start the countdown or teleport the players in. Or, if it is below that number, cancel the countdown.
Hopefully, this helps you out and you can get this done eventually!
Yeah. What I need is for it to count to 2 players then start the countdown, then when it makes the elevator maxed, I would want it to not let anyone else in until someone leaves the elevator.
In that case, once the value == 2 you can disable the script that teleports the players in and adds to the value, and if one of the players leave, re-enable the script. You could even do some things with remote events to make a message pop-up saying the elevator is full.
I’m assuming the object value is what dictates who is sent into the private server. So you could have 2 values, one to store the player names, and another to store the player count.
I’ve added a playerMet script and I’ve made a tiny change to your TriggerScript. In the trigger script, once the player touches the part it will add 1 to the playerCount value and teleport them in. In the playerMet script, it will always wait for the player count to be 2. (then you can add in whatever you want it to do.) Elevator.rbxm (54.4 KB)