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

CreatePlaceAsync() creating new place and returning new PlaceId?

Asked by 8 years ago

According to ROBLOX wiki (http://wiki.roblox.com/index.php?title=API:Class/AssetService/CreatePlaceAsync), the CreatePlaceAsync() Yield Function will create a place (with the arguments given) and then return the new placeId if the new created place. So that being said, will this script work:

local asset = game:GetService("AssetService")

local newPlace = asset:CreatePlaceAsync("NewPlace",123456) --123456 is an example

So my question is, will the code on line 3 create the place and return the new placeId it created, or do I need to do something else?

Also, when you create a new place using this, can I just use the Teleport() function of TeleportService using the new PlaceId generated (assuming my above code worked) to send players to this new server?

Answer this question