Is there a better way to doing this without the script being super messed up? It chooses the map before doing intermission and I'm not sure what to do...

--//Variables

Intermission = 10
GameTime = 10

--//Functions

function ChangeText(Text)
	local Players = game.Players:GetPlayers()
	for i = 1, #Players do
	Players[i].PlayerGui:WaitForChild("ActivityGui").MainFrame.ActivityLabel.Text = Text
end
end

function BarBring()
--Original(0,0,0.45,0)
--Away(-3,0,0.45,0)
	local Players = game.Players:GetPlayers()
	for i = 1, #Players do
	Players[i].PlayerGui:WaitForChild("ActivityGui").MainFrame:TweenPosition(UDim2.new(0,0,0.45,0),Quad,1,true)	
end
end

function BarLeave()
	local Players = game.Players:GetPlayers()
	for i = 1, #Players do
	Players[i].PlayerGui:WaitForChild("ActivityGui").MainFrame:TweenPosition(UDim2.new(-3,0,0.45,0),Quad,1,true)	
end
end

function BeginIntermission()
	local Players = game.Players:GetChildren()
	for i = Intermission, 0, -1 do
	ChangeText("Beginning Game In: " ..i)
	wait(1)
end
end

function GetMap()
	local Maps = game.ReplicatedStorage.Maps:GetChildren()
	local PickMap = math.random(1, #Maps)
	local SelectedMap = Maps[PickMap]:Clone()
	SelectedMap.Name = 'Map'
	SelectedMap.Parent = game.Workspace
	ChangeText("Map Chosen: " ..SelectedMap.MapName.Value)
end

while true do
	BarBring()
	wait(0.5)
	BeginIntermission()
	wait(0.5)
	BarLeave()
	wait(0.5)
	GetMap()
	wait(0.5)
	BarBring()
	wait(1)
	BarLeave()
	wait(0.5)
end

9 comments

0

Stop using the same title for every single question you ask. Use a question title that is actually relevant to the question.

0

I would, but when I try to make an actual title, it tells me to be more specific and if I be more specific, it does the same thing.

0

same title thing is annoying >_<

0

Please make a real title, and then we'll talk.

0

There.

0

The script probably shouldn't start unless there are players in the server. Otherwise, the BarBring() will do nothing since there aren't any players yet.

0

Also, try printing the text in intermission to check if it is actually running.

0

Alright

0

Oh my gosh, TYSM. I fixed it. You saved my life. xD