ServerScript in ServerScriptService:
function givetools(player)
if #game.ServerStorage.TeamTools:FindFirstChild(player.Team.Name):GetChildren() ~= 0 then
for itools, tools in pairs(game.ServerStorage.TeamTools:FindFirstChild(player.Team.Name):GetChildren()) do
local clone = tools:Clone()
clone.Parent = player.Backpack
end
end
end
function givegui(player)
if #game.ServerStorage.TeamGuis:FindFirstChild(player.Team.Name):GetChildren() ~= 0 then
for igui, gui in pairs(game.ServerStorage.TeamGuis:FindFirstChild(player.Team.Name):GetChildren()) do
local clone = gui:Clone()
print(clone)
clone.Parent = player.PlayerGui
print(clone.Parent)
end
end
end
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function()
if player.TeamColor ~= BrickColor.new("Ghost grey") and player.TeamColor ~= BrickColor.new("Medium stone grey") then
print(#game.ServerStorage.TeamTools:FindFirstChild(player.Team.Name):GetChildren())
givegui(player)
givetools(player)
end
end)
end)
Prints: http://prntscr.com/ryjded
but nothing found in PlayerGui or seen on your screen.
