This is supposed to be a team tools script but the script is not working, I do not know why and I need some help.
local teamtools = game:GetService("ServerStorage"):WaitForChild("TeamTools"):GetChildren()
local teams = game:GetService("Teams").TeamStorage:GetChildren()
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function()
wait(5)
for i,v in pairs(teamtools) do
local team = teams:FindFirstChild(v.Name)
if team then
if player.TeamColor == team.TeamColor then
for u,o in pairs(v) do
local newtool = o:Clone()
newtool.Parent = player.Backpack
end
end
end
end
end)
end)
