generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: How would I make a timer SurfaceGui?

Previous Thread :: Next Thread 
JxMonsterz is not online. JxMonsterz
Joined: 29 Jan 2011
Total Posts: 428
02 Mar 2014 09:52 PM
I've been trying to make this work since last month, I can't find it out. Anyone could help?
Report Abuse
PuNiShEr5665 is not online. PuNiShEr5665
Joined: 12 Aug 2009
Total Posts: 33713
02 Mar 2014 09:53 PM
Explain what you need more,
is it just a GUI that counts down?
What do you need to activate it to start counting
Report Abuse
JxMonsterz is not online. JxMonsterz
Joined: 29 Jan 2011
Total Posts: 428
02 Mar 2014 09:55 PM
I'm actually remaking my one game, Prop Hunt.. and I need it to countdown for each round. From 4 minutes (240 Seconds)
Report Abuse
JxMonsterz is not online. JxMonsterz
Joined: 29 Jan 2011
Total Posts: 428
02 Mar 2014 09:58 PM
Bump
Report Abuse
shadowcalen1 is not online. shadowcalen1
Joined: 05 Mar 2012
Total Posts: 480
02 Mar 2014 09:58 PM
First create a surface gui. Then find a free timer gui that you like and insert it into the surface gui. Edit it the way you like and you have it. (I have basically no skill with scripting so this may not work)
Report Abuse
JxMonsterz is not online. JxMonsterz
Joined: 29 Jan 2011
Total Posts: 428
02 Mar 2014 09:59 PM
I don't like to free model, sorry :/
Report Abuse
HalfCircuit is not online. HalfCircuit
Joined: 20 Apr 2011
Total Posts: 5018
02 Mar 2014 10:01 PM
If you just want to display seconds

for i = 240,0,-1 do
wait(1)
gui.Text = i
end

if you want to do minutes its a bit more complex
but its like

for i = 4,0,-1 do
minutes = i
wait(1)
for b = 59,0,-1 do
seconds = b
wait(1)
if seconds < 10 then
gui.Text = minutes .. ":0" .. seconds
else
gui.Text = minutes .. ":" .. seconds
end
end
end
Report Abuse
JxMonsterz is not online. JxMonsterz
Joined: 29 Jan 2011
Total Posts: 428
02 Mar 2014 10:02 PM
I'v tried this, It's not even changing the text. I need to know how to make it change, I've tried both in local and non-local scripts.
Report Abuse
JxMonsterz is not online. JxMonsterz
Joined: 29 Jan 2011
Total Posts: 428
02 Mar 2014 10:03 PM
Eats popcorn and watches for replies*
Report Abuse
JxMonsterz is not online. JxMonsterz
Joined: 29 Jan 2011
Total Posts: 428
02 Mar 2014 10:04 PM
Bump2
Report Abuse
JxMonsterz is not online. JxMonsterz
Joined: 29 Jan 2011
Total Posts: 428
02 Mar 2014 10:08 PM
Bump3 :I
Report Abuse
shadowcalen1 is not online. shadowcalen1
Joined: 05 Mar 2012
Total Posts: 480
02 Mar 2014 10:09 PM
There is nothing wrong with using a free moddle script to figure out whats wrong. If you can find a script that works you can then find out whats wrong with yours and then, fix it.
Report Abuse
robocu3 is not online. robocu3
Joined: 13 Mar 2009
Total Posts: 6485
02 Mar 2014 10:10 PM
yeah, no one's replying to anyone. this is getting old. ;-;
-=Robo=-
Report Abuse
JxMonsterz is not online. JxMonsterz
Joined: 29 Jan 2011
Total Posts: 428
02 Mar 2014 10:10 PM
^no

Someone help lol
Report Abuse
JxMonsterz is not online. JxMonsterz
Joined: 29 Jan 2011
Total Posts: 428
02 Mar 2014 10:12 PM
b4

-_____-
Report Abuse
JxMonsterz is not online. JxMonsterz
Joined: 29 Jan 2011
Total Posts: 428
02 Mar 2014 10:14 PM
tyttrgr megoe reromvfdld oewkl fwkemge;lhrtpomevkernobern



B5 PLS

this is bs
Report Abuse
JxMonsterz is not online. JxMonsterz
Joined: 29 Jan 2011
Total Posts: 428
02 Mar 2014 10:18 PM
...
Report Abuse
trogyssy is not online. trogyssy
Joined: 29 Oct 2010
Total Posts: 2322
02 Mar 2014 10:53 PM
Insert a surfacegui on the part. Put a textlabel in the surfacegui. Name the textlabel "Timer", the surfacegui "GUI", the part "Clock". Call the function to start the ticking.

function Time()
local Timer=Game.Workspace.Clock.GUI.Timer
local t=1
repeat local time=tostring(t)
Timer.Text=time
wait(1)
t=t+1
until t==240
end

Here's the function if you want the rest of the script to pause while the function runs

TimerActive=false
function Time()
TimerActive=true
local Timer=Game.Workspace.Clock.GUI.Timer
local t=1
repeat local time=tostring(t)
Timer.Text=time
wait(1)
t=t+1
until t==240
TimerActive=false
end

Here's how you'd call the function for the pause to work

if TimerActive==false then
Time()
wait(0.5)
repeat wait() until TimerActive==false
end
Report Abuse
trogyssy is not online. trogyssy
Joined: 29 Oct 2010
Total Posts: 2322
02 Mar 2014 10:56 PM
corrections:

function Time()
local Timer=Game.Workspace.Clock.GUI.Timer
local t=1
local time
repeat time=tostring(t)
Timer.Text=time
wait(1)
t=t+1
until t==240
end



Second function corrected:

TimerActive=false
function Time()
TimerActive=true
local Timer=Game.Workspace.Clock.GUI.Timer
local t=1
local time
repeat time=tostring(t)
Timer.Text=time
wait(1)
t=t+1
until t==240
TimerActive=false
end
Report Abuse
PancakeAttacks is not online. PancakeAttacks
Joined: 16 Jul 2011
Total Posts: 121
13 Mar 2014 01:16 AM
Message me I can help I'm a Scripter. 0.0
Report Abuse
wubbzy301 is not online. wubbzy301
Joined: 15 May 2010
Total Posts: 1188
13 Mar 2014 01:19 AM
yournumber = 30
while true do
yournumber = yournumber - 1
print(yournumber .. "")
wait(1)
if yournumber <= 0 then
break
end
end
Report Abuse
mysticalchickenwing2 is not online. mysticalchickenwing2
Joined: 28 May 2012
Total Posts: 3283
13 Mar 2014 01:22 AM
lets just make this simple from scratch:

time = 240

local p = Instance.new("Part", Workspace)
p.Name = "Clock"
p.Size = Vector3.new(3, 3, 1)
p.Transparency = 0.4

local g = Instance.new("SurfaceGui", p)
g.Name = "Display"

local f = Instance.new("Frame", p)
f.Size = UDim2.new(1, 0, 1, 0) --yes....full size of brick

local tl = Instance.new("TextLabel", p)
tl.Size = UDim2.new(1, 0, 1, 0) --scale to frame

function countdown()
repeat
time = time - 1
tl.Text = time
wait(1)
until
time == 0
wait(1)
time = 240
end
wait(5) --or whatever you want before round start
countdown()
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image