|
| 24 Dec 2014 10:40 PM |
Hey, So I have this script. What it does is start the game at start_game() then go to run_game() and play a cutscene. The problem is the cutscene only plays for Player 1, This game requires 8 Players, So players 2-8 won't see the cutscene at all. run_game() has more code after it (including more cutscenes). But I need a fix for this so that everyone see's the cutscene. Thanks -Cold
function run_game() script.IntroHarmony:Play() for _,player in pairs(game.Players:GetPlayers()) do local new_script = script.CutsceneB1:clone() new_script.Parent = player.Backpack new_script.Disabled = false script.Message.Text= "I never thought the Zombie apocalypse would happen" wait(3) script.Message.Text= "When it did, nobody was ready" wait(3) script.Message.Text= "" wait(3) script.Message.Text= "There was chaos in the streets" wait(3) script.Message.Text="The zombies killed everyone in a matter of days" wait(3) script.Message.Text= "" wait(3) script.Message.Text="They say it started in a lab in Atlanta City" wait(3) script.Message.Text="They were trying to create a chemical weapon, But it all went wrong" wait(3) new_script.Disabled = true script.IntroMusic:Play() script.Message.Text="" for _,player in pairs(game.Players:GetPlayers()) do local new_script = script.IntroGUI:clone() new_script.Parent = player.PlayerGui wait(1) new_script.Frame.TextLabel.Text = "OutBreak" wait(1) script.Teleport.Value = true wait(1) script.Teleport.Value = false wait(8) new_script.Frame.TextLabel.Text = "FOUR DAYS LATER" wait(5) new_script:Remove()
function start_game() running = true script.Theme:Play() wait(math.random(10,20)) script.DeadPlayers.Value = 0 script.StartPlayers.Value = 0 print("Starting a new game of OutBreak.") script.Message.Text = "Welcome to OutBreak." wait(3) script.Message.Text = "OutBreak will begin in: 5." script.Five:Play() wait(1) script.Message.Text = "OutBreak will begin in: 4." script.Four:Play() wait(1) script.Message.Text = "OutBreak will begin in: 3." script.Three:Play() wait(1) script.Message.Text = "OutBreak will begin in: 2." script.Two:Play() wait(1) script.Message.Text = "OutBreak will begin in: 1." script.One:Play() wait(1) script.Message.Text = "OutBreak will begin in: 0." script.Start:Play() wait(1) script.Message.Text = "" script.Game.Value = true --script.StartPlayers.Value = game.Players.NumPlayers script.Theme:Stop() run_game() end |
|
|
| Report Abuse |
|
|
|
| 24 Dec 2014 10:41 PM |
| Just noticed. There are is a series of "end" at the end of the run_game() function. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 25 Dec 2014 03:20 AM |
Wrap your for loops with
coroutine.wrap(function() -- For loops and script in here end)() |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|