here is my script i put it inside serverscriptserviece and i dont know whats wrong
Numplayers = 1 Minigames = game.ServerStorage.Minigames : getChildren () function msg (text) print (text) end
function PlayerAdded(Player)
local Bool = Instance.new ("BoolValue" , Player)
Bool.Name = "AFK
end
function GetPlayers()
local Players = {}
for i,v in pairs (game.Players:GetChildren()) do
if v:FindFirstChild ("AFK") and not v .AFK.Value then
table.insert(Players, v)
end
end
return players
end
game.Players.PlayerAdded:connect(PlayerAdded)
while true do
local Players = GetPlayers()
if #Players() >= Numplayers then
Msg ("There are not enough players, to start the game!")
wait (3)
Msg ("Choosing a map...")
wait (2)
local chosen = Minigames [math.random] (1, #Minigames(]
local Clone = Chosen = Chosen:Clone()
wait (2)
Msg ("Minigame chosen! The map is "... chosen.Name..)
Clone.Parent = workspace.CurrentMinigame
Msg ("Teleporting players to the minigame.")
for i,v in pairs (Player) do
if v then
local Teleport = Clone.Teleports:GetChildren () [math.random(1, #Clone.Teleports:GetChildren)()]
v.Charcter:SetPrimaryPartCFrame(Teleport.CFrame * CFrame.new (0, 5 ,0))
Teleport:Destroy()
end
end
else
Msg ("There are not enough players to start the game!")
end
wait()
end

7 comments
i see so many typos and errors
for starter u left the bool.name as "afk
starters*
i fixed that i must of deleted it :| what else please tell me idk what is wrong
Open your output. Are there any errors popping up when you run? Paste the errors here
20:22:21.513 - tyr5.rbxl auto-recovery file was created Loading Tree Gen... Finished Loading Tree Gen Loading Cutscene Editor... Finished Loading. 20:22:22.949 - Plugin_142613350.EmptyScriptAdder:7: unfinished string near '") ' Loading Tree Gen... Finished Loading Tree Gen Loading Cutscene Editor... Finished Loading. 20:22:24.285 - Plugin_142613350.EmptyScriptAdder:7: unfinished string near '") '
it seems the script goes away?