Code sample for GetFriendsAsync has a syntax error

The code sample for the GetFriendsAsync (Players | Documentation - Roblox Creator Hub) doesn’t run due to a syntax error on line 33:

-- and finally, print!
print("Friends of " .. USERNAME .. ": " table.concat(usernames, ", "))
--  local USERNAME = "Sh:33: Expected ')' (to close '(' at column 10), got 'table'

To fix this, add the missing .. right before table.concat:

-- and finally, print!
print("Friends of " .. USERNAME .. ": " .. table.concat(usernames, ", "))
--                                      ^^ add this
6 Likes