Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Finding the ID of a place with a script? [closed]

Asked by 9 years ago

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)?

0
Of *which* place automatically? You say "rejoin" so it's not clear which place you're referring to BlueTaslem 18071 — 9y
1
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. Devotional 210 — 9y
0
I don't think this is possible, why not just get the ID from the place manually? Perci1 4988 — 9y
2
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 M39a9am3R 3210 — 9y
0
Oh that's cool. Perci1 4988 — 9y

Locked by BlueTaslem

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?

1 answer

Log in to vote
0
Answered by
BlueTaslem 18071 Moderation Voter Administrator Community Moderator Super Administrator
9 years ago

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

Ad