Eventive
|
  |
| Joined: 28 Jul 2011 |
| Total Posts: 9827 |
|
|
| 27 Feb 2017 04:54 PM |
I am trying to make a games round script, but this doesn't work at all. I want it so when there are 2 players in the server, it will start a 15 second intermission and display that on the GUI, then once the 15 Seconds are up, it shows a GUI for them to pick their element, then the 10 seconds are up for that, it teleports them to a teleporter called "GameRoundTele" and they have 120 seconds to finish battling.
Help?
SERVER: local RE = game.ReplicatedStorage:WaitForChild("GameEvent") local round = false local choose = false local afk = false
if game.Players.PlayerNum >= 2 then ---- Intermission ---- if not round then RE:FireAllClients('intermission') choose = true end if choose then RE:FireAllClients('choose') round = true end if round then RE:FireAllClient('round') RE.OnServerEvent:connect(function(player, request) if request == 'tele' then player.Character.HumanoidRootPart.CFrame = game.Workspace.Teleporters:WaitForChild("GameRoundTele").CFrame+Vector3.new(0,5,0) end end) end end
LOCAL: local RE = game.ReplicatedStorage:WaitForChild("GameEvent") local label = script.Parent.Label local time = script.Parent.Time
RE.OnClientEvent:connect(function(player, request) if request == 'intermission' then label.Text = "Intermission" for i = 15,0,-1 do time.Text = i wait(1) end elseif request == 'choose' then label.Text = "Element Choose!" player.PlayerGui.CharGui.Background.Visible = true player.PlayerGui.CharGui.Decor.Visible = true for i = 10, 0, -1 do time.Text = i wait(1) end elseif request == 'round' then RE:FireServer('tele') label.Text = "Round in Progress" for i = 120, 0, -1 do time.Text = i wait(1) end end end)
ATR'er since 2013. |
|
|
| Report Abuse |
|
|
Fangous
|
  |
| Joined: 03 Jul 2010 |
| Total Posts: 4448 |
|
|
| 27 Feb 2017 04:58 PM |
| you are only checking the number of players once |
|
|
| Report Abuse |
|
|
Eventive
|
  |
| Joined: 28 Jul 2011 |
| Total Posts: 9827 |
|
|
| 27 Feb 2017 05:03 PM |
added this: repeat wait() until game.Players.NumPlayers >= 2 if game.Players.NumPlayers >= 2 then
still not working at all.
ATR'er since 2013. |
|
|
| Report Abuse |
|
|
|
| 27 Feb 2017 05:04 PM |
| You have made multiple posts with the same script. |
|
|
| Report Abuse |
|
|
Eventive
|
  |
| Joined: 28 Jul 2011 |
| Total Posts: 9827 |
|
|
| 27 Feb 2017 05:08 PM |
Mister, Actually this one is re-made from my previous post.
ATR'er since 2013. |
|
|
| Report Abuse |
|
|
Eventive
|
  |
| Joined: 28 Jul 2011 |
| Total Posts: 9827 |
|
|
| 27 Feb 2017 05:24 PM |
Nevermind, I got it.
ATR'er since 2013. |
|
|
| Report Abuse |
|
|