this sisa very long script but I need to show you all of it to understand so I will put this in where I have the problem --Bob and then Ill close it off with --/Bob so when my game loads when I server test it only gives the tool to one player which is the second player that loaded so Im thinking somewhere there needs to be a waitforchild or a complete wait() please help me I will give a rep thanks johndeer2233 how Can I fix This?
-- Made By johndeer2233
-- Make a hint
h = Instance.new("Hint",game.Workspace)
--If there is more than 1 player
while true do
if game.Players.NumPlayers > 1 then
-- Choosing A Map
maps = game.ServerStorage.Maps:GetChildren()
h.Text = "Choosing A Map"
wait(3)
ranGame = math.random(1,#maps)
ChosenGame = maps[ranGame]
h.Text = "Map Chosen: "..ChosenGame.Name
wait(3)
ChosenGameClone = ChosenGame:Clone()
ChosenGameClone.Parent = game.Workspace
wait(3)
-- Teleport Players To Map
local spawns = ChosenGameClone.Spawns:GetChildren()
for i,v in pairs(game.Players:GetPlayers()) do
name = v.Name
check = game.Workspace:FindFirstChild(name)
if check then
checkHumanoid = check:FindFirstChild("Humanoid")
if checkHumanoid then
v.Character:MoveTo(spawns[i].Position)
end
end
end
-- **Bob**
-- if certain Maps/Gives Tools
if ChosenGameClone.Name == "OfficeMap"then
function GiveToolThrowingKnife()
local name2 = game.Players:FindFirstChild(name)
if name2 then
local playersBackpack = name2:WaitForChild("Backpack")
if playersBackpack then
local ThrowingKnife = game.ServerStorage.ThrowingKnife
if ThrowingKnife then
local ThrowingKnifeClone = ThrowingKnife:Clone()
ThrowingKnifeClone.Parent = playersBackpack
end
end
end
end
GiveToolThrowingKnife()
end
--**/Bob**
--Timer Before Game Starts
for i = 3, 0, -1 do
h.Text = "Time Till Game Begins: "..i
wait(1)
end
h.Text = "Game Begins"
-- Countdown till game ends
for i = 180, 1, -1 do
h.Text = "Time Left: "..i
wait(1)
end
h.Text = "Game Ended"
ChosenGameClone:Destroy()
else
h.Text = "There Is Not Enough Players To Start"
wait(3)
end
wait(1)
end

1 comment
Yes thanks I understand now thanks to you ill find another way thanks