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

CreatePlaceAsync Description Not Showing?

Asked by 9 years ago

The code creates the place successfully, but the description doesn't show for the place

local asset = game:GetService("AssetService")
local function match(plr1,plr2)
local matchnum = 1337 --(a number from a datastore would be put here)
local placeid = asset:CreatePlaceAsync("Siegecast Matchup Game #"..tostring(matchnum),211481450,plr1.." vs "..plr2)
end
0
What are plr1 and plr2? Merely 2122 — 9y
0
plr1 and plr2 are Strings. This is a duplicate post being done from an alternate account of OP. https://scriptinghelpers.org/questions/15979/createplaceasync-description-not-working DigitalVeer 1473 — 9y

1 answer

Log in to vote
0
Answered by 9 years ago

I'm not positive if you're passing in plr1 and plr2 as strings or the actual Player objects. Try this:

local asset = game:GetService("AssetService")

local function match(plr1,plr2)
local n1 = (type(plr1) == "string" and plr1 or plr1.Name);
local n2 = (type(plr2) == "string" and plr2 or plr2.Name);
local desc = n1.." vs "..n2
local pName = "Siegecast Matchup Game #"..tostring(matchnum);
local matchnum = 1337
local placeid = asset:CreatePlaceAsync(pName,211481450,desc)
end

0
I did print(plr1.." vs "..plr2) at the beginning of the function and it successfully printed "Player1 vs Player2" :/ FutureWebsiteOwner 270 — 9y
Ad

Answer this question