|
| 13 Sep 2012 03:13 PM |
Okay, I want to make a script that simply counts down. I have that down. BUT I nned the sound to stop playing after the script ends. Help?
Script: m = Instance.new('Message') m.Parent = game.Workspace h = Instance.new('Hint') h.Parent = game.Workspace
while true do wait(2) m.Text = "T Minus Ten Seconds" Wait(0.2) script.Parent:play() h.Text = "10" wait(1) h.Text = "9" wait(1) h.Text = "8" wait(1) h.Text = "7" wait(1) h.Text = "6" wait(1) h.Text = "5" wait(1) h.Text = "4" wait(1) h.Text = "3" wait(1) h.Text = "2" wait(1) h.Text = "1" wait(1) m.Text = "Bye Bye!" script:remove() m:remove() h:remove() end
|
|
|
| Report Abuse |
|
|
|
| 13 Sep 2012 03:16 PM |
m = Instance.new("Message", Workspace) h = Instance.new("Hint", Workspace)
while true do wait(2) m.Text = "T Minus Ten Seconds" Wait(0.2) script.Parent:play() h.Text = "10" wait(1) h.Text = "9" wait(1) h.Text = "8" wait(1) h.Text = "7" wait(1) h.Text = "6" wait(1) h.Text = "5" wait(1) h.Text = "4" wait(1) h.Text = "3" wait(1) h.Text = "2" wait(1) h.Text = "1" wait(1) m.Text = "Bye Bye!" script:Destroy() m:Destroy() h:Destroy() SOUNDNAMEHERE:Stop() end
I think there is something easier than saying h.Text all the time
Something to do with for i = something
|
|
|
| Report Abuse |
|
|
|
| 13 Sep 2012 03:18 PM |
| The sound is the "script.Parent:play()" and why destroy and not remove? |
|
|
| Report Abuse |
|
|
|
| 13 Sep 2012 03:18 PM |
script.Parent:play()
If the script is in the brick (which I assume it is), then say script.Parent.Soundname:play()
|
|
|
| Report Abuse |
|
|
|
| 13 Sep 2012 03:19 PM |
| :Destroy() is better to use |
|
|
| Report Abuse |
|
|
|
| 13 Sep 2012 03:22 PM |
| No its not, its in a sound Icon (Object > Sound > Workspace) It is very down to the bone sound. Then a time script. The 'script.Parent:play()' is the sound starting to play not the name. |
|
|
| Report Abuse |
|
|
|
| 13 Sep 2012 03:23 PM |
m = Instance.new('Message') m.Parent = game.Workspace h = Instance.new('Hint') h.Parent = game.Workspace
while true do wait(2) m.Text = "T Minus Ten Seconds" Wait(0.2) script.Parent:play() for i = 1, 10, -1 do h.Text = i end wait(1) m.Text = "Bye Bye!" m:Destroy() h:Destroy() end script:Destroy() |
|
|
| Report Abuse |
|
|
|
| 13 Sep 2012 03:24 PM |
Oops, forgot something:
m = Instance.new('Message') m.Parent = game.Workspace h = Instance.new('Hint') h.Parent = game.Workspace
while true do wait(2) m.Text = "T Minus Ten Seconds" wait(0.2) script.Parent:Play() for i = 1, 10, -1 do h.Text = i wait(1) end m.Text = "Bye Bye!" m:Destroy() h:Destroy() end script:Destroy() |
|
|
| Report Abuse |
|
|
| |
|
|
| 13 Sep 2012 03:36 PM |
| No. See the problem is that when the sound starts it is seems to loop forever. I want to stop that loop. The text is fine. I'm done with the text i need to know how to stop the sound.. |
|
|
| Report Abuse |
|
|
|
| 13 Sep 2012 03:40 PM |
Sound:stop(). pls learn to script. |
|
|
| Report Abuse |
|
|
|
| 13 Sep 2012 03:46 PM |
| Please shut up because that wont stop the sound its stops the entire script where it is.. |
|
|
| Report Abuse |
|
|
|
| 13 Sep 2012 03:47 PM |
oh so sound:stop() is wrong?
k
http://wiki.roblox.com/index.php/Stop_(Method) |
|
|
| Report Abuse |
|
|
|
| 13 Sep 2012 03:50 PM |
| Fine ill try it smarty pants.. |
|
|
| Report Abuse |
|
|
|
| 13 Sep 2012 03:52 PM |
| Nope.. It didn't even play the sound. |
|
|
| Report Abuse |
|
|
|
| 13 Sep 2012 03:52 PM |
try
script.Parent.Sound:Stop()
that's if the sound is in the brick..
|
|
|
| Report Abuse |
|
|
|
| 13 Sep 2012 03:53 PM |
| I have had multiple years of experiance with all kinds of programming, I am trying to help you, and you insult me. It works, trust me. If you can't make it work, please reread the tutorials. |
|
|
| Report Abuse |
|
|
|
| 13 Sep 2012 03:54 PM |
| Exactly its not in a brick.. and I did use that, I'm no idiot.. |
|
|
| Report Abuse |
|
|
|
| 13 Sep 2012 03:54 PM |
try this...
m = Instance.new("Message", Workspace) h = Instance.new("Hint", Workspace)
while wait(2) do m.Text = "T Minus Ten Seconds" wait(0.2) script.Parent.SOUDNAMEHERE:Play() -- Whatever the sound name is in the brick. for i = 1, 10, -1 do h.Text = i wait(1) end m.Text = "Bye Bye!" m:Destroy() h:Destroy() script.Parent.SOUNDNAMEHERE:Stop() end script:Destroy()
Now, is the sound INSIDE the brick? Or is it in workspace..?
|
|
|
| Report Abuse |
|
|
|
| 13 Sep 2012 03:55 PM |
@chicken i forgot the script.Parent
lul. |
|
|
| Report Abuse |
|
|
|
| 13 Sep 2012 03:56 PM |
You insulted me.. 'Pls learn to script'
Never mind I'm not going to argue, you just shouldn't be so quick to judge.. |
|
|
| Report Abuse |
|
|
|
| 13 Sep 2012 03:57 PM |
| I think he was talking to me |
|
|
| Report Abuse |
|
|
|
| 13 Sep 2012 04:00 PM |
No. The other guy. Since he is so offended, I now lay the task apon anyone else who wants to finish the work.
I had a working script, too :P.
If you guys want it just ask. |
|
|
| Report Abuse |
|
|
|
| 13 Sep 2012 04:01 PM |
It's inside workspace. So basically when you enter the game it plays that. ( or press the play thingy in Studio. Here is what my workspace looks like. _____________ [Workspace] Terrain >CountDown --- This is where the I have the script ( Its a sound ) Script --- The script :P Instance Players ______________ (You get the idea)
|
|
|
| Report Abuse |
|
|
|
| 13 Sep 2012 04:04 PM |
No, honestly I don't want the working script, that's not what this Forum is for. I simply wanted 'HELP' on the script.
thanks anyway chicken :) |
|
|
| Report Abuse |
|
|