huner2
|
  |
| Joined: 27 Apr 2008 |
| Total Posts: 1681 |
|
|
| 10 Aug 2011 03:43 PM |
d = true
function brick() if not d then return end d = false a = Instance.new("Hint",Workspace) a.Text = "Hello!" wait(3) a:Remove() d = true end script.Parent.Touched:connect(brick)
How do I add another message? |
|
|
| Report Abuse |
|
|
huner2
|
  |
| Joined: 27 Apr 2008 |
| Total Posts: 1681 |
|
| |
|
Ozzypig
|
  |
| Joined: 27 Mar 2008 |
| Total Posts: 4906 |
|
|
| 10 Aug 2011 03:45 PM |
Only one Hint can appear on screen at once, but you can simply instantiate a new Hint under a different variable.
b = Instance.new("Hint", workspace) b.Text = "Derp" |
|
|
| Report Abuse |
|
|
smurf279
|
  |
| Joined: 15 Mar 2010 |
| Total Posts: 6871 |
|
|
| 10 Aug 2011 03:45 PM |
Instance.new("Message", Workspace)
Why would you need to instance another message? |
|
|
| Report Abuse |
|
|
smurf279
|
  |
| Joined: 15 Mar 2010 |
| Total Posts: 6871 |
|
|
| 10 Aug 2011 03:46 PM |
| Oh you meant to say hint. . . |
|
|
| Report Abuse |
|
|
huner2
|
  |
| Joined: 27 Apr 2008 |
| Total Posts: 1681 |
|
|
| 10 Aug 2011 03:49 PM |
Oh so I would put
d = true
function brick() if not d then return end d = false a = Instance.new("Hint",Workspace) a.Text = "Hello!" wait(3) a:Remove() b = Instance.new("Hint",Workspace) b.Text = "Hello!" wait(3) b:Remove() d = true end script.Parent.Touched:connect(brick)
Thanks |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2011 03:50 PM |
I already answered your question..
Messages = {"Hello","Hi","You can add more messages like this do what I did"} Wait = 2 function brick() a = Instance.new("Hint",Workspace) for i=1,#Messages do a.Text = Messages[i] wait(Wait) end wait(3) a:Remove() end script.Parent.Touched:connect(brick) |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2011 03:53 PM |
| That script wont do that well.. you're better off using my for loop script.. you can make it say as many messages as you want. |
|
|
| Report Abuse |
|
|
huner2
|
  |
| Joined: 27 Apr 2008 |
| Total Posts: 1681 |
|
|
| 10 Aug 2011 03:53 PM |
Oh sorry :D
Thanks a bunch! |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2011 03:55 PM |
Messages = {"Hello","Hi","You can add more messages like this do what I did"} function brick() a = Instance.new("Hint",Workspace) a.Text = Messages[math.random(1,#Messages)] wait(3) a:Remove() end script.Parent.Touched:connect(brick)
That script will say a random message from the message box(table) |
|
|
| Report Abuse |
|
|
huner2
|
  |
| Joined: 27 Apr 2008 |
| Total Posts: 1681 |
|
|
| 10 Aug 2011 03:58 PM |
| I'm trying to have it say them in order.Also the hints don't show up. |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2011 04:00 PM |
| How is that? I am sure my code is correct. |
|
|
| Report Abuse |
|
|
huner2
|
  |
| Joined: 27 Apr 2008 |
| Total Posts: 1681 |
|
|
| 10 Aug 2011 04:02 PM |
Nope I put in
Messages = {"Hello","Hi","You can add more messages like this do what I did"} Wait = 2 function brick() a = Instance.new("Hint",Workspace) for i=1,#Messages do a.Text = Messages[i] wait(Wait) end wait(3) a:Remove() end script.Parent.Touched:connect(brick
and tested it to see if it worked before I changed any texts and nothing showed up. |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2011 04:03 PM |
| script.Parent.Touched:connect(brick) ...... |
|
|
| Report Abuse |
|
|
huner2
|
  |
| Joined: 27 Apr 2008 |
| Total Posts: 1681 |
|
|
| 10 Aug 2011 04:04 PM |
| Oh :/ I'm so stupid... I diddn't copy/paste it all... |
|
|
| Report Abuse |
|
|
huner2
|
  |
| Joined: 27 Apr 2008 |
| Total Posts: 1681 |
|
|
| 10 Aug 2011 04:10 PM |
| T_T another problem,whenI touch the brick it says all 3 things then delete's the last 2 but the 1'st one is still visible |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2011 04:12 PM |
Messages = {"Hello","Hi","You can add more messages like this do what I did"} function brick() a = Instance.new("Hint",Workspace) for i=1,#Messages do wait(3) a.Text = Messages[i] end wait(3) a:Remove() end script.Parent.Touched:connect(brick)
my bad |
|
|
| Report Abuse |
|
|
huner2
|
  |
| Joined: 27 Apr 2008 |
| Total Posts: 1681 |
|
| |
|
huner2
|
  |
| Joined: 27 Apr 2008 |
| Total Posts: 1681 |
|
|
| 10 Aug 2011 04:18 PM |
| Also sorry but how would I make it remove the brick you touched as well? |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2011 04:21 PM |
Messages = {"Hello","Hi","You can add more messages like this do what I did"} function brick() a = Instance.new("Hint",Workspace) for i=1,#Messages do wait(3) a.Text = Messages[i] end wait(3) script.Parent:Remove() end script.Parent.Touched:connect(brick) |
|
|
| Report Abuse |
|
|
| |
|
huner2
|
  |
| Joined: 27 Apr 2008 |
| Total Posts: 1681 |
|
| |
|
huner2
|
  |
| Joined: 27 Apr 2008 |
| Total Posts: 1681 |
|
|
| 10 Aug 2011 04:26 PM |
| I tested to see if this would happen and it did:if you press it more than once it will come back up and there will be a bunch of messages.Is there anyway I could make it happen only once? |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2011 04:28 PM |
Messages = {"Hello","Hi","You can add more messages like this do what I did"} stop = true function brick() if stop then stop = false a = Instance.new("Hint",Workspace) for i=1,#Messages do wait(3) a.Text = Messages[i] end wait(3) script.Parent:Remove() end end script.Parent.Touched:connect(brick) |
|
|
| Report Abuse |
|
|
huner2
|
  |
| Joined: 27 Apr 2008 |
| Total Posts: 1681 |
|
|
| 10 Aug 2011 04:32 PM |
| It dosen't remove the hint from the top. |
|
|
| Report Abuse |
|
|