How to use TeleportService with Strings?

Yet another post.

In my story game, I have where a player enters the elevator and gets a StringValue called, “Elevator1”.

What I want to do is make a script that runs through to see who all has the StringValue and if it is above the minimum number, to send them into the story game. Any ideas?

1 Like

Just loop through game.Players, table.insert every player with the string into a table, and if #table>number then teleport everyone in the table into your place

I understand that I need to do that but I don’t know how I would start…

What do you mean by how you would start? Are you having trouble with when you would run that code? In that case, just run it every time somebody enters the elevator

Its just im not familiar with doing table stuff so I don’t know how I would start the code.

1 Like

I can send you a picture of what I have?

aha

I don’t even know if this is correct-

I think you should learn more about tables before attempting something like this, since having a good foundation will help a lot.

You can learn more here

1 Like

I still don’t know how to remotely script this. I looked at the forum, it didn’t really help me.