the part im talking about is line 10
local gameison = workspace.thegame.gameinprogress
local startgame = workspace.thegame.startgame
while true do
wait(0.01)
if startgame.Value == false then
startgame.Value = true
wait(10)
local playerCount = #game.Players:GetPlayers()
print("player checked there is " ..playerCount.. " players")
if playerCount >= 1 then
workspace.thegame.scripto.Disabled = false
gameison.Value = true
local playerCount = #game.Players:GetPlayers()
local pllayer1 = workspace.thegame:FindFirstChild("player1").Value
print(pllayer1)
if pllayer1 ~= nil then
workspace:FindFirstChild(pllayer1).HumanoidRootPart.Position = workspace.thegame.Plate1.PlayerSpawn1.Position + Vector3.new(0, 3, 0)
game.Players:FindFirstChild(pllayer1).Team = game.Teams.living
end
local pllayer2 = workspace.thegame:FindFirstChild(workspace.thegame.player2.Value)
if pllayer2 ~= nil then
workspace:FindFirstChild(pllayer2).HumanoidRootPart.Position = workspace.thegame.Plate2.PlayerSpawn2.Position + Vector3.new(0, 3, 0)
game.Players:FindFirstChild(pllayer2).Team = game.Teams.living
end
local pllayer3 = workspace.thegame:FindFirstChild(workspace.thegame.player3.Value)
if pllayer3 ~= nil then
print(pllayer1)
workspace:FindFirstChild(pllayer3).HumanoidRootPart.Position = workspace.thegame.Plate3.PlayerSpawn3.Position + Vector3.new(0, 3, 0)
game.Players:FindFirstChild(pllayer3).Team = game.Teams.living
end
local pllayer4 = workspace.thegame:FindFirstChild(workspace.thegame.player4.Value)
if pllayer4 ~= nil then
print(pllayer1)
workspace:FindFirstChild(pllayer4).HumanoidRootPart.Position = workspace.thegame.Plate4.PlayerSpawn4.Position + Vector3.new(0, 3, 0)
game.Players:FindFirstChild(pllayer4).Team = game.Teams.living
end
local pllayer5 = workspace.thegame:FindFirstChild(workspace.thegame.player5.Value)
if pllayer5 ~= nil then
print(pllayer5)
workspace:FindFirstChild(pllayer5).HumanoidRootPart.Position = workspace.thegame.Plate5.PlayerSpawn5.Position + Vector3.new(0, 3, 0)
game.Players:FindFirstChild(pllayer5).Team = game.Teams.living
end
local pllayer6 = workspace.thegame:FindFirstChild(workspace.thegame.player6.Value)
if pllayer6 ~= nil then
print(pllayer1)
workspace:FindFirstChild(pllayer6).HumanoidRootPart.Position = workspace.thegame.Plate6.PlayerSpawn6.Position + Vector3.new(0, 3, 0)
game.Players:FindFirstChild(pllayer6).Team = game.Teams.living
end
script.Disabled = true
break
end
end
end
print("script ended")