|
| 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 |
|
|
| |
|
| |
|
| |
|
|
| 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 |
|
|
|
| 02 Apr 2012 10:47 PM |
Remember, you can't reference the location of a property.
t = script.Parent t.Text = "Blah" |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|