Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

My Minigame setup. Can you please help me?

I'm having a problem with my minigame setup. There's a GUI in the StarterGui section that is invisible and when the game launches the gui's map text will say Choosing Map. Choosing Map.. Choosing Map... twice but when It get's to the Map chosing part this comes up.

https://gyazo.com/55e135c611522a39a635bb05cbc677cb

Can you please help me?

GraveYard = "http://www.roblox.com/asset/?id=277534694"
HauntedMansion = "http://www.roblox.com/asset/?id=277534694"

Minigames = game.ServerStorage.Minigames:GetChildren()

Announce = game.StarterGui.Announcer.Main.GameIMG.ChooseMap
Announcing = game.StarterGui.Announcer.Main.GameIMG

while true do
	if game.Players.NumPlayers >3 then
		randomGame = math.random(1, #Minigames)
		gameChosen = Minigames[randomGame]
		wait(0.5)
		Announce.Text = "Choosing Map."
		wait(0.5)
		Announce.Text = "Choosing Map.."
		wait(0.5)
		Announce.Text = "Choosing Map..."
		wait(0.5)
		Announce.Text = "Choosing Map."
		wait(0.5)
		Announce.Text = "Choosing Map.."
		wait(0.5)
		Announce.Text = "Choosing Map..."
		if gameChosen.Name == GraveYard then
			wait(3.0)
			Announcing.GraveYard.Visible = true
			Announce.Text = "Map Chosen:" .. gameChosen.Name
		end
	else
		if gameChosen.Name == HauntedMansion then
			wait(3.0)
			Announcing.HauntedMansion.Visible = true
			Announce.Text = "Map Chosen:" .. gameChosen.Name
		end
	end
end

1 answer

The only thing I can see that makes it not to work is the math.random Instead of;

randomGame = math.random(1, #Minigames)
gameChosen = Minigames[randomGame]

It should be,

randomGame = Minigames[math.random(1, #Minigames)]
gameChosen = Minigames[randomGame]

That's the only problem I see, but if that doesn't work, there must be a different problem.

This discussion is preserved as it was. New answers, comments, and votes are closed.