|
| 12 Jul 2015 11:56 PM |
I have a script inside the GUI i'm working with; it's not a localscript. But the problem is, it still shows up for only that player. How do I make it so say you join, it starts counting down. Now it's at 19. Another player joins, and it's now at 19 instead of restarting from 30. Here's the script:
local tvalue = script.Parent local pvalue = script.Parent.Parent local maps = {"Map1", "Map2"} local gamemodes = {"Regular", "CTF", "King of the Hill"} local mapvalue = game.Lighting.Map local gamemodevalue = game.Lighting.Gamemode state = script.Parent.Parent.State beep = script.Parent.Parent.Beep local id = "244937380" beep.SoundId = "http://www.roblox.com/asset/?id=" .. id
function choosemap() resultmap = maps[math.random(1, #maps)] mapvalue.Value = resultmap end
function choosegamemode() resultmode = gamemodes[math.random(1, #gamemodes)] gamemodevalue.Value = resultmode desc = "" if resultmode == "Regular" then desc = "A regular round. Kill the enemy." elseif resultmode == "CTF" then desc = "Capture the enemy flag." elseif resultmode == "King of the Hill" then desc = "Stay on the hill as king to earn points." end end
function lobby() state.Value = "SlideIn" for i = 30, 0, -1 do wait(1) print(i) tvalue.Text = i beep:Play() if i == 1 then id = "244937312" beep.SoundId = "http://www.roblox.com/asset/?id=" .. id beep:Play() wait(1) end if i == 0 then tvalue.Text = "" pvalue.Text = "Choosing map.." wait(3) choosemap() pvalue.Text = "Chosen map: " .. resultmap wait(3) pvalue.Text = "Choosing gamemode.." wait(3) choosegamemode() pvalue.Text = "Gamemode chosen: " .. resultmode tvalue.Text = desc wait(3) pvalue.Text = "Let's get shootin'!" state.Value = "SlideOut" tvalue.Text = "" end end end
if game.Players.NumPlayers > 1 then lobby() else --pvalue.Text = "Need one more player to begin." --tvalue.Text = "Because we're that mean." lobby() end
"YOU SHALL NOT BLOX!" // Scripter // Developer // ~ Join my primary! |
|
|
| Report Abuse |
|
|
Vyxium
|
  |
| Joined: 31 Aug 2010 |
| Total Posts: 1020 |
|
|
| 13 Jul 2015 01:24 AM |
| 1st of all, dont use free models, 2nd, no one is going to read all that, 3rd, anything inside the player is local (including playerguis, starterguis, etc) |
|
|
| Report Abuse |
|
|
|
| 13 Jul 2015 02:09 AM |
Free models? No. Lol. You underestimate me.. -_-
"YOU SHALL NOT BLOX!" // Scripter // Developer // ~ Join my primary! |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 13 Jul 2015 04:16 AM |
You iterate through all the players guis and update them. Also, if you are trying to do this in a local script, stop. Use a serverscript.
"Talk is cheap. Show me the code." - Linus Torvalds |
|
|
| Report Abuse |
|
|
|
| 13 Jul 2015 12:51 PM |
I fixed it, thanks.
"YOU SHALL NOT BLOX!" // Scripter // Developer // ~ Join my primary! |
|
|
| Report Abuse |
|
|
|
| 13 Jul 2015 12:54 PM |
use a string value then put in function lol() game.Workspace.StringValue.Value = script.Parent.Text end
game.Workspace.StringValue.Changed:connect(lol)
"As a wise man once told me, get out." |
|
|
| Report Abuse |
|
|