This script is in server script service,((THIS IS ONLY HALF OF THE SCRIPT)) So i added Script.Parent.Music:Play and Script.Parent.Music:Stop Wont work any help?
function CountDown() wait(5) for i,v in pairs(game.Players:GetChildren()) do coroutine.resume(coroutine.create(function() local Time = 30 local Hint = GuiModule.IntermissionHint(v,"There will now be a brief intermission..") wait(1) Script.Parent.Music:Play while Time > 0 do Time = Time - 1 Hint.TextLabel.Text = "Intermission: "..Time wait(1) end Hint.TextLabel.Text = "Starting game.." Script.Parent.Music:Stop GuiModule.RetractIntermissionHint(Hint) end)) end wait(30) end
You aren't calling those methods, you're only sort of indexing them. If you looked at the output, you would see it cursing you.
:Play
should be :Play()
and :Stop
should be :Stop()
1waffle is correct. If you are too lazy to add the parenthesis to your code, here you do :P
function CountDown() wait(5) for i,v in pairs(game.Players:GetChildren()) do coroutine.resume(coroutine.create(function() local Time = 30 local Hint = GuiModule.IntermissionHint(v,"There will now be a brief intermission..") wait(1) Script.Parent.Music:Play() while Time > 0 do Time = Time - 1 Hint.TextLabel.Text = "Intermission: "..Time wait(1) end Hint.TextLabel.Text = "Starting game.." Script.Parent.Music:Stop() GuiModule.RetractIntermissionHint(Hint) end)) end wait(30) end