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

Why is my map choosing script not working?

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

✓ Accepted answer

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.

1 comment

0

The GUI doesn't even show!I dunno why.Please help!

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