|
| 19 Jan 2017 11:42 AM |
This is in a script, in a StarterGUI + A text label.
while true do script.Parent.Text = "3 Hours Remaining" wait(60) script.Parent.Text = "2 Hours Remaining" wait(60) script.Parent.Text = "1 Hour Remaining" wait(60) script.Parent.Text = "Survival Ended" wait(5) script.Parent.Text = "Intermission." wait(1) script.Parent.Text = "Intermission.." wait(1) script.Parent.Text = "Intermission..." wait(1) script.Parent.Text = "Intermission." wait(1) script.Parent.Text = "Intermission.." wait(1) script.Parent.Text = "Intermission..." wait(1) script.Parent.Text = "Get ready to survive" wait(3) end
R$18 |
|
|
| Report Abuse |
|
|
|
| 19 Jan 2017 01:03 PM |
function GameState() local hours = 3 repeat script.Parent.Text = hours.." Hours Remaining" hours = hours - 1 until hours = 0 script.Parent.Text = "Survival Ended" wait(5) end
function Intermission() time = 7 dots = 0 repeat if dots = 4 then dots = 0 end if dots = 1 then script.Parent.Text = "Intermission." elseif dots = 2 then script.Parent.Text = "Intermission.." elseif dots = 3 then script.Parent.Text = "Intermission..." end dots = dots+1 time = time-1 until time = 0 script.Parent.Text = "Get ready to survive" wait(3) end
while wait() do Intermission() GameState() end
NOW GATHER, UNDER THE NAME OF TEAM ROCKET! |
|
|
| Report Abuse |
|
|
|
| 19 Jan 2017 01:05 PM |
my bad, messed up
function GameState() local hours = 3 repeat script.Parent.Text = hours.." Hours Remaining" hours = hours - 1 wait(60) until hours = 0 script.Parent.Text = "Survival Ended" wait(5) end
function Intermission() time = 7 dots = 0 repeat wait(1) if dots = 4 then dots = 0 end if dots = 1 then script.Parent.Text = "Intermission." elseif dots = 2 then script.Parent.Text = "Intermission.." elseif dots = 3 then script.Parent.Text = "Intermission..." end dots = dots+1 time = time-1 until time = 0 script.Parent.Text = "Get ready to survive" wait(3) end
while wait() do Intermission() GameState() end
NOW GATHER, UNDER THE NAME OF TEAM ROCKET! |
|
|
| Report Abuse |
|
|
Roblok1
|
  |
| Joined: 27 Jul 2011 |
| Total Posts: 2019 |
|
|
| 19 Jan 2017 01:20 PM |
Well, first of all, you might want to do the countdown part in a seperate script in ServerScriptService. Then insert a StringValue in ReplicatedStorage and change that value instead. Next, insert a LocalScript inside of the gui text label. After that, in the local script, change the text of the text label to what the string value is whenever its changed.
And there you have it. I will post the script(s) in a min...
|
|
|
| Report Abuse |
|
|
pidgey
|
  |
| Joined: 16 Jan 2008 |
| Total Posts: 2739 |
|
|
| 19 Jan 2017 01:48 PM |
for seconds = 1, 60 do print("Intermission."..string.rep(".", seconds % 3)) --adds 2 dots max, changes every time seconds increments
wait(1) end
this is a lot easier than using a bunch of if statements i guess
http://wiki.roblox.com/index.php?title=Global_namespace/String_manipulation#string.rep |
|
|
| Report Abuse |
|
|
Roblok1
|
  |
| Joined: 27 Jul 2011 |
| Total Posts: 2019 |
|
|
| 19 Jan 2017 02:16 PM |
Ok, here are the scripts... Sorry for the late reply
-- Server Script in ServerScriptService --------------------------- msg = game.ReplicatedStorage.gameText -- make sure its a string value while true do for i = 3, 1, - 1 do if i == 1 then msg.Value = i.." Hour Remaining" else msg.Value = i.." Hours Remaining" end wait(60) end msg.Value = "Survival Ended" wait(5) for i = 10, 0, - 1 do msg.Value = "Intermission." wait(1) end msg.Value = "Get ready to survive" wait(3) end
-- Local Script in a TextLabel ------------------------------- msg = game.ReplicatedStorage.gameText -- make sure its a string value label = script.Parent
msg.Changed:connect(function() label.Text = msg.Value end)
|
|
|
| Report Abuse |
|
|