local AllowedPlayers = {
["Player1"] = true,
["Player2"] = true,
["Player3"] = true,
["Player4"] = true,
["WyattagumsBackUp"] = true
}
local Tools = game.ServerStorage.ToolsFolder:GetChildren()
game.Players.PlayerAdded:Connect(function(player)
if AllowedPlayers[player.Name] then
player.CharacterAdded:Connect(function(character)
for _, MyTools in pairs(Tools) do
if MyTools:IsA("Tool") then
MyTools:Clone().Parent = game.Players[player.Name]:WaitForChild("Backpack")
end
end
end)
end
end)
local AllowedPlayers = {
["Player1"] = true,
["Player2"] = true,
["Player3"] = true,
["Player4"] = true,
["WyattagumsBackUp"] = true
}
local Tools = game.ServerStorage.ToolsFolder:GetChildren()
game.Players.PlayerAdded:Connect(function(player)
game.Workspace.Part.ClickDetector.MouseClick:Connect(function()
if AllowedPlayers[player.Name] then
for _, v in pairs(Tools) do
if v:IsA("Tool") then
v:Clone().Parent = game.Players[player.Name].Backpack
end
end
end
end)
end)
2 comments
move each tool into Backpack using a for loop
thanks, I think I tried that but didn't work, I'll try again