Is there any way to convert an instance to a string ? The output tells me that i cant use concat because my table is an instance and i cant understand why
local standingPlayers = table.concat(playersInRound, ',')
print(standingPlayers)
invalid value (Instance) at index 1 in table for 'concat'
You must get the desired information from the instances (for example here maybe the players name) and store it in strings table before using table.concat.
Im trying to apply what you just told me but it seems that i did it wrong Im sorry i dont really have experience in tables, could you please show me an example of script describing what you are telling me or something that could help me to visualise what i have to do ?
Alright, if I stick to what the error says and the fact I still don’t know what you want to do. I think you should do like this:
local PlayersInRoundName = {}
for _, player in pairs(playersInRound) do -- I've use generic for loop but if it's an array you can also use numeric for loop
table.insert(PlayersInRoundName, player.Name)
end
local standingPlayers = table.concat(PlayersInRoundName, ',')
print(standingPlayers)