local folders = workspace.Nations:GetChildren()
for _, folder in pairs(folders) do
print(folder.Name)
local team = Instance.new("Team")
team.Name = folder.Name
team.Parent = game.Teams
end
Where the script is:
It does not make a team for every child in the Nations folder, I don’t understand what I’m doing wrong.
Well, there are two types of scripts - Local scripts and Server scripts. Both of these types of scripts can run in only certain locations. For example, a server script can’t run in ReplicatedFirst because ReplicatedFirst holds local scripts. You can’t run a local script in ServerScriptService either, because ServerScriptService isn’t accessible by the client.