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: GUI Timer Help

Previous Thread :: Next Thread 
FisherPenguin is not online. FisherPenguin
Joined: 14 Jun 2010
Total Posts: 1157
31 Mar 2012 08:22 AM
This script is supposed to make a GUI's text change over time when a flag is Navy blue. I don't know why this doesn't work, no output. (I think the problem may be with the function). Any help would be appreciated.

f = game.Workspace.Model.Flag
t = script.Parent.Text

function onTouched(Touched)
if f.BrickColor == BrickColor.new("Navy blue") then
t = "5"
wait(1)
t = "4"
wait(1)
t = "3"
wait(1)
t = "2"
wait(1)
t = "1"
wait(1)
t = "0"
wait(1)
t = "YIPPE IT WORKED!!!"
end
end

game.Workspace.Model.Base.Touched:connect(onTouched)


+-Fishy
Report Abuse
Contemptus is not online. Contemptus
Joined: 27 Mar 2012
Total Posts: 368
31 Mar 2012 08:39 AM
Wait, what's not working?
Report Abuse
Stripeyman879 is not online. Stripeyman879
Joined: 31 Jul 2008
Total Posts: 1726
31 Mar 2012 09:00 AM
Output?
Report Abuse
FisherPenguin is not online. FisherPenguin
Joined: 14 Jun 2010
Total Posts: 1157
02 Apr 2012 10:38 PM
No output.

+-Fishy
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
02 Apr 2012 10:41 PM
f = game.Workspace.Model.Flag
t = script.Parent.Text

Game.Workspace.Model.Base.Touched:connect(function()
if f.BrickColor == BrickColor.new("Navy blue") then
for i = 5, 0, -1 do
t = i
wait(1)
end
wait(1)
t = "YIPPE IT WORKED!!!"
end
end)

Maybe?

† KMXD †
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
02 Apr 2012 10:47 PM
Remember, you can't reference the location of a property.


t = script.Parent
t.Text = "Blah"
Report Abuse
FisherPenguin is not online. FisherPenguin
Joined: 14 Jun 2010
Total Posts: 1157
02 Apr 2012 10:56 PM
Nope, still nothing.

f = game.Workspace.Model.Flag
t = script.Parent
t.Text = "...wait..."

function onTouched(hit)
if f.BrickColor == BrickColor.new("Navy blue") then
t = "5"
wait(1)
t = "4"
wait(1)
t = "3"
wait(1)
t = "2"
wait(1)
t = "1"
wait(1)
t = "0"
wait(1)
t = "YIPPE IT WORKED!!!"
end
end

game.Workspace.Model.Base.Touched:connect(onTouched)


+-Fishy
Report Abuse
koblaster456 is not online. koblaster456
Joined: 20 Jun 2009
Total Posts: 533
02 Apr 2012 11:40 PM
f = game.Workspace.Model.Flag
t = script.Parent
t.Text = "...wait..."

function onTouched(hit)
if f.BrickColor == BrickColor.new("Navy blue") then
t.Text = "5"
wait(1)
t.Text = "4"
wait(1)
t.Text = "3"
wait(1)
t.Text = "2"
wait(1)
t.Text = "1"
wait(1)
t.Text = "0"
wait(1)
t.Text = "YIPPE IT WORKED!!!" --read what AFF said
end
end

game.Workspace.Model.Base.Touched:connect(onTouched)
Report Abuse
FisherPenguin is not online. FisherPenguin
Joined: 14 Jun 2010
Total Posts: 1157
02 Apr 2012 11:52 PM
So what, like this? Still not working...

f = game.Workspace.Model.Flag
b = script.Parent
t = b.Text

function onTouched(hit)
if f.BrickColor == BrickColor.new("Navy blue") then
t = "5"
wait(1)
t = "4"
wait(1)
t = "3"
wait(1)
t = "2"
wait(1)
t = "1"
wait(1)
t = "0"
wait(1)
t = "YIPPE IT WORKED!!!"
end
end

game.Workspace.Model.Base.Touched:connect(onTouched)


+-Fishy
Report Abuse
radiogamer is not online. radiogamer
Joined: 06 Oct 2008
Total Posts: 1975
02 Apr 2012 11:57 PM
with all thos t = number

you must change the text, not the variable itself...

Use what you had before with t, and put t.Text = "1" etc
Report Abuse
breuning is not online. breuning
Joined: 30 Oct 2008
Total Posts: 4268
03 Apr 2012 02:01 AM
Let's try a while loop.
Is b a hint or a message? Humanoids don't got a Text property.
f = game.Workspace.Model.Flag
b = script.Parent
t = b.Text

function onTouched(hit)
while f.BrickColor == BrickColor.new("Navy blue") do
b.Text = "5"
wait(1)
b.Text = "4"
wait(1)
b.Text = "3"
wait(1)
b.Text = "2"
wait(1)
b.Text = "1"
wait(1)
b.Text = "0"
wait(1)
b.Text = "YIPPE IT WORKED!!!"
end
end

game.Workspace.Model.Base.Touched:connect(onTouched)

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