I am currently testing for my minigame, but for some reason the minigames dosen't work in "Starting server.." mode, is there something I am missing? Because the script work perfectly fine in "Play" mode.
wait()
minigames = game.ReplicatedStorage.Minigames:GetChildren()
numPlayers = game.Players.NumPlayers
while wait() do
if numPlayers >= 1 then
print("Starting")
randGame = math.random(1, #minigames)
print(randGame)
chosenGame = minigames[randGame]
print(chosenGame)
-------------------------------------------------------
if randGame == 1 then
cloneGame = game.ReplicatedStorage.Minigames.Dissapearing_Grass:Clone()
cloneGame.Parent = game.Workspace
wait(5)
cloneGame:Destroy()
wait(3)
end
-------------------------------------------------------
-------------------------------------------------------
if randGame == 2 then
cloneGame = game.ReplicatedStorage.Minigames.Dissapearing_Grass2:Clone()
cloneGame.Parent = game.Workspace
wait(5)
cloneGame:Destroy()
wait(3)
end
-------------------------------------------------------
-------------------------------------------------------
if randGame == 3 then
cloneGame = game.ReplicatedStorage.Minigames.Dissapearing_Grass3:Clone()
cloneGame.Parent = game.Workspace
wait(5)
cloneGame:Destroy()
wait(3)
end
-------------------------------------------------------
-------------------------------------------------------
if randGame == 4 then
cloneGame = game.ReplicatedStorage.Minigames.Dissapearing_Grass4:Clone()
cloneGame.Parent = game.Workspace
wait(5)
cloneGame:Destroy()
wait(3)
end
-------------------------------------------------------
-------------------------------------------------------
if randGame == 5 then
cloneGame = game.ReplicatedStorage.Minigames.Dissapearing_Grass5:Clone()
cloneGame.Parent = game.Workspace
wait(5)
cloneGame:Destroy()
wait(3)
end
-------------------------------------------------------
end
end
