Lines 25-29 not working when 10 players enter the game, any ideas why?
it should teleport the players to above their planes when Cars value is 10 or more
local DefinitelyPlane = workspace:FindFirstChild("1")
local PlaneName = 1
local Plane = workspace:FindFirstChild(PlaneName)
local PositionXX = 87.18
local PlayerQuantity = 0
local Full = false
if script.Cars.Value >= 10 then
Full = true
end
game.Players.PlayerAdded:Connect(function(Player)
print(Player.Name)
PlayerQuantity = PlayerQuantity + 1
if script.Cars.Value < 10 then
local RPlane = Plane:Clone()
script.Cars.Value = script.Cars.Value + 1
PlaneName = PlaneName + 1
PositionXX = PositionXX - 15
RPlane.Parent = workspace
RPlane.Name = PlaneName
RPlane:MoveTo(Vector3.new(PositionXX, 5.1, -922.8))
print("Not Enough Players")
if script.Cars.Value > 9 then
print("Enough Players! Starting Round...")
local char = Player.Character or Player.CharacterAdded:Wait()
local hrp = char:WaitForChild("HumanoidRootPart")
hrp.CFrame = CFrame.new(PositionXX, 8.1 , -922.8)
end
end
end)

2 comments
lemme try this
Still not working