I need help creating a Tower Defense Simulator Elevator

Hello everyone! I need help creating an elevator for my next game! This elevator teleports players to a different place.

Here is the Tower Defense Simulator Elevator if you don’t know what I mean (The file is too big to put on the DevForum): bandicam 2020-08-04 15-43-24-504.mp4 - Google Drive

I have some of it done. Here is what I have done
Untitled

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.

2 Likes

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 -

Image

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.

Well the values to teleport players is an object value.

You could change it to a number value, which would make it easier to work with.

The Object Value is a players name so it wouldnt really work.

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.

ok. Do you want me to share a model of the elevator and you would come back with a better model?

I’m not doing much right now, so sure. I could add in a couple things and give you back the updated version.

BK Elevator.rbxl (70.0 KB)
Here you go!

1 Like

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)

I can’t open .RBXM files. Can you make it RBLX or RBXLX?

Just rename the .rbxm file to rbxl. It should work fine.