Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

My Minigame setup. Can you please help me?

Asked by 8 years ago

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

Log in to vote
0
Answered by
xuefei123 214 Moderation Voter
8 years ago

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.

Ad

Answer this question