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: SoundScript + Message Help?

Previous Thread :: Next Thread 
chawawainatoco is not online. chawawainatoco
Joined: 22 Jan 2010
Total Posts: 423
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
BobbyisLOLZ is not online. BobbyisLOLZ
Joined: 17 Aug 2010
Total Posts: 8045
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
chawawainatoco is not online. chawawainatoco
Joined: 22 Jan 2010
Total Posts: 423
13 Sep 2012 03:18 PM
The sound is the "script.Parent:play()" and why destroy and not remove?
Report Abuse
BobbyisLOLZ is not online. BobbyisLOLZ
Joined: 17 Aug 2010
Total Posts: 8045
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
BobbyisLOLZ is not online. BobbyisLOLZ
Joined: 17 Aug 2010
Total Posts: 8045
13 Sep 2012 03:19 PM
:Destroy() is better to use
Report Abuse
chawawainatoco is not online. chawawainatoco
Joined: 22 Jan 2010
Total Posts: 423
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
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
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
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
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
chawawainatoco is not online. chawawainatoco
Joined: 22 Jan 2010
Total Posts: 423
13 Sep 2012 03:34 PM
Ill try it
Report Abuse
chawawainatoco is not online. chawawainatoco
Joined: 22 Jan 2010
Total Posts: 423
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
chickenman158 is not online. chickenman158
Joined: 18 Jan 2011
Total Posts: 915
13 Sep 2012 03:40 PM
Sound:stop().
pls learn to script.
Report Abuse
chawawainatoco is not online. chawawainatoco
Joined: 22 Jan 2010
Total Posts: 423
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
BobbyisLOLZ is not online. BobbyisLOLZ
Joined: 17 Aug 2010
Total Posts: 8045
13 Sep 2012 03:47 PM
oh so sound:stop() is wrong?

k

http://wiki.roblox.com/index.php/Stop_(Method)
Report Abuse
chawawainatoco is not online. chawawainatoco
Joined: 22 Jan 2010
Total Posts: 423
13 Sep 2012 03:50 PM
Fine ill try it smarty pants..
Report Abuse
chawawainatoco is not online. chawawainatoco
Joined: 22 Jan 2010
Total Posts: 423
13 Sep 2012 03:52 PM
Nope.. It didn't even play the sound.
Report Abuse
BobbyisLOLZ is not online. BobbyisLOLZ
Joined: 17 Aug 2010
Total Posts: 8045
13 Sep 2012 03:52 PM
try

script.Parent.Sound:Stop()

that's if the sound is in the brick..
Report Abuse
chickenman158 is not online. chickenman158
Joined: 18 Jan 2011
Total Posts: 915
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
chawawainatoco is not online. chawawainatoco
Joined: 22 Jan 2010
Total Posts: 423
13 Sep 2012 03:54 PM
Exactly its not in a brick.. and I did use that, I'm no idiot..
Report Abuse
BobbyisLOLZ is not online. BobbyisLOLZ
Joined: 17 Aug 2010
Total Posts: 8045
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
BobbyisLOLZ is not online. BobbyisLOLZ
Joined: 17 Aug 2010
Total Posts: 8045
13 Sep 2012 03:55 PM
@chicken
i forgot the script.Parent

lul.
Report Abuse
chawawainatoco is not online. chawawainatoco
Joined: 22 Jan 2010
Total Posts: 423
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
BobbyisLOLZ is not online. BobbyisLOLZ
Joined: 17 Aug 2010
Total Posts: 8045
13 Sep 2012 03:57 PM
I think he was talking to me
Report Abuse
chickenman158 is not online. chickenman158
Joined: 18 Jan 2011
Total Posts: 915
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
chawawainatoco is not online. chawawainatoco
Joined: 22 Jan 2010
Total Posts: 423
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
chawawainatoco is not online. chawawainatoco
Joined: 22 Jan 2010
Total Posts: 423
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
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