the problem is that it change the text to the same "v.Value" and i want it to change to all the childrens of "t" not just one of them
1 | local t = game.Workspace.Jobs:GetChildren() |
2 |
3 | for i, v in ipairs (t) do |
4 | while true do |
5 | wait(. 1 ) |
6 | script.Parent.Text = "(" ..v.Value.. ", " ..v.Value.. ", " ..v.Value.. ", " ..v.Value.. ", " ..v.Value.. ")" |
7 | end |
8 | end |
Here's my solution, using table.concat and a secondary table.
1 | local Jobs = workspace.Jobs:GetChildren() |
2 | local Names = { } |
3 | for i,v in pairs (Jobs) do |
4 | table.insert(Names,v.Value) |
5 | end |
6 | print ( "Jobs: " ..table.concat(Names).. "." ) |