So for example, how to I put the value C0deCakes.Name to a string in a table so it will show up like this:
example = {"C0deCakes"}
So for example, how to I put the value C0deCakes.Name to a string in a table so it will show up like this:
example = {"C0deCakes"}
local names = {}
game.Players.PlayerAdded:connect(function(player)
table.insert(names, player.Name)
print(table.concat(names, ''))
end)
I get the Idea of inserting players name into the table, right?
local names = {}
table.insert(names, "C0deCakes")
What I mean is, how would I insert something like C0deCakes.Name's value into the table in string form? In order for my script to work, we cannot assume the name is C0deCakes, it could be someone other than me.
This discussion is preserved as it was. New answers, comments, and votes are closed.
6 comments
Will it show up as names = {"C0deCake"}?
It puts the player who joins name onto it.
Yeah but will it add it like this: names = {"C0deCakes"} or this: name = {C0deCakes}?
It prints just C0deCAkes not with ""
Would I be able to see if the players name is in the table by using a generic for to iterate through the table then say if player.Name == v?
I guess so.