Say I want to make a command to "rejoin" a game. Is there a way for a script to know the ID of a place automatically(without me manually having to put the ID into the script)?
✓ ANSWER ACCEPTED
Finding the ID of a place with a script?
1 answer
✓ Accepted answer
As M39a9am3R said, DataModels have a PlaceId property
In case you weren't aware, game is the "DataModel" of a place.
So, game.PlaceId is the ID of the current running place.
It's 0 when not running on ROBLOX server (ie, when testing on your own device)
Locking this Question
This discussion is preserved as it was. New answers, comments, and votes are closed.

5 comments
Of which place automatically? You say "rejoin" so it's not clear which place you're referring to
Oh. Sorry. So say I'm in any place. I'm in that game. When I say "rejoin"(assuming I can do that), I'm talking about using Teleport(PlaceID,character) to re-enter the game without having to leave the game myself and clicking Play again.
I don't think this is possible, why not just get the ID from the place manually?
I think using game.PlaceId will work. There is a property for DataModel that does this. http://wiki.roblox.com/index.php?title=API:Class/DataModel/PlaceId
Oh that's cool.