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

How to concatenate players with table containing properties of Players?

Asked by
i_geeb 0
2 years ago

Here's what I have so far


local targetPath = game.Players local targetProperties = {Name, Age, UserId} local seperator = "..v.." for i,v in pairs(targetPath:GetChildren()) do proppies = (v..targetProperties) propertyMerge = table.concat(targetProperties,seperator) print(proppies) end

what im trying to do is get the targetProperties and print then with my Instance, which is player

Here's what I am expecting out of

 local targetPath = game.Players
 local targetProperties = {Name, Age, UserId}

 for i,v in pairs(targetPath:GetChildren()) do
     proppies = (v..targetProperties)
     print(proppies.."\n")
end

Wanted Output:

Testuser1 200 1 --User's name, Account Age and UserID

Testuser2 199 2

Testuser3 198 3

Current Output

[ERROR] eattempt to concatenate instance with table

Answer this question