print(game.Workspace:GetChildren(3).Name) the output i get from this is a table but i want the name, how can i make that happen?
Since GetChildren
returns an array/table you can just do this.
print(game.Workspace:GetChildren()[3].Name)
You could do: (I don't know why you would do this but ok)
local t = workspace:GetChildren() local c = 0 for i,v in pairs(t) do if c == 3 then print(v.Name) c = c + 1 else if c < 3 then c = c + 1 end end end
If you want to find the child with name number 3 do:
if workspace:FindFirstChild("3") then print(workspace:FindFirstChild("3").Name) end
If I didn't understand what you meant please leave a comment.
Just a simple way to do it
local ThirdChild = game.Workspace:GetChildren()[3] --Gets the third value from the Array