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

Why is my map choosing script not working?

Asked by 9 years ago

Please fix this!Please?

minigames=game.Lighting.Maps:GetChildren()
G=game.StarterGui.ScreenGui.TextBox

while true do
    wait(3)
    if game.Players.NumPlayer > 4 then
        wait(3)
        G.Visible=true
        G.Text='Chosing Map'
        ranGame=math.random(1,#minigames)
        gamechosen=minigames[ranGame]
        G.Text='The Round For This Round Will be'..gamechosen.Name
        wait(3)
        gamechosenclone=gamechosen:Clone()
        gamechosenclone=game.Workspace
        for i=10,1,-1 do

            G.Text='Time Left'..i
        end
        G.Text='Game Ended'
        wait(3)
        gamechosenclone:Destroy()
    else
        G.Visible=true
        G.Text'There Needs To Be At Least 4 Players To Start'
    end
end


1 answer

Log in to vote
2
Answered by
neff111 20
9 years ago

When you do gamechosenclone=gamechosen:Clone() gamechosenclone=game.Workspace, you are Cloning your map, then setting it to Workspace without ever giving the map a parent.

I think you meant to do gamechosenclone=gamechosen:Clone() gamechosenclone.Parent=game.Workspace

I hope this helps. .3.

0
The GUI doesn't even show!I dunno why.Please help! Accelital -7 — 9y
Ad

Answer this question