This script won't do anything even when the right player enters (Doesn't work in solo also)and i'm guessing its because of line 3. Oh,and how could I fix it?
PlayerWithTools = {"Zombomafoo","Player1"}
--------------------------------------------------
function FindFirstInTable(Table,String)
for _,v in pairs (Table) do
if v == String then
return v,true
else
return false
end
end
end
--------------------------------------------------
game.Players.PlayerAdded:connect(function(Player)
Player.CharacterAdded:connect(function(Character)
----------------------------------------------------
Player = FindFirstInTable(PlayerWithTools,Player.Name)
if Player then
for _,Tools in pairs (game.ServerStorage:GetChildren()) do
ClonedTools = Tools:Clone()
ClonedTools.Parent = Player.Backpack
end
end
end)
end)

2 comments
How could I fix it?
Replace the entire script.