|
| 09 May 2017 12:41 PM |
i'm trying to make a script so when 2 players are in the game it will change all the players guis to a countdown but I am having trouble any help?
game.Players.PlayerAdded:connect(function(player) if game.Players.NumPlayers == 2 then countDown() end end)
|
|
|
| Report Abuse |
|
|
|
| 09 May 2017 01:23 PM |
| In my game I just made the timer in a server script and fired all clients with a remote event every second. |
|
|
| Report Abuse |
|
|
|
| 09 May 2017 01:27 PM |
| wouldn't there be a more efficient way of doing it though? |
|
|
| Report Abuse |
|
|
|
| 09 May 2017 01:33 PM |
| countDown() = wait'number' then, a frame |
|
|
| Report Abuse |
|
|
|
| 09 May 2017 01:33 PM |
| ^ i am trying to get all the players guis so I can change them all at once. |
|
|
| Report Abuse |
|
|
|
| 09 May 2017 02:16 PM |
"wouldn't there be a more efficient way of doing it though?" I seriously don't see how his say is inefficient. |
|
|
| Report Abuse |
|
|
|
| 09 May 2017 02:21 PM |
| I fire all clients with the countdown value, and let the clients handle the countdown |
|
|
| Report Abuse |
|
|
|
| 09 May 2017 02:40 PM |
| could anyone give an example? I am bad with remote events |
|
|
| Report Abuse |
|
|
|
| 09 May 2017 02:47 PM |
--Server
RE:FireAllClients(60)
-- Local script, player
RE.OnClientEvent:Connect(function(Time) for x = Time,0,-1 do wait(1) print(x) end end) |
|
|
| Report Abuse |
|
|