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

AssetService question, can someone help?

Asked by 8 years ago

I am creating a game which has a lobby server and then a map that the user can teleport to when they have created their character etc... I was wondering if it was possible to list all the available server and amount of players (like in 'The Plaza'). Here is my code so far:

local TP = game.Workspace.TeleportPlayer
newPlace = game:GetService("AssetService"):CreatePlaceAsync("City", 348764007)

function TP.OnServerInvoke(player)
    print(player.Name)
    game:GetService("TeleportService"):Teleport(newPlace, player)
    return "Complete"
end

http://wiki.roblox.com/index.php?title=API:Class/AssetService/GetGamePlacesAsync

I tried using this because it sounds like what I'm trying to do but I have never used pages before so don't know what to do.

0
Wouldn't it be easier to have a "Complete" button they press, and then it TP's them? TheHospitalDev 1134 — 8y
0
The play button is on the clients GUI, this RemoteFunction is triggered when they press the play button. But I wanted to list the servers on the clients GUI MaskedVoid 15 — 8y

Answer this question