|
| 29 Sep 2013 11:44 PM |
Simple I know, just what exactly do I type.
"Do you enjoy heaps of dancing and frivolous diversions, cause I do, Sir or Ma'am." |
|
|
| Report Abuse |
|
|
|
| 29 Sep 2013 11:48 PM |
Maybe repeat: ?
"Do you enjoy heaps of dancing and frivolous diversions, cause I do, Sir or Ma'am." |
|
|
| Report Abuse |
|
|
|
| 29 Sep 2013 11:52 PM |
| Depends, if you want to repeat it a certain amount of times, use a for loop. If you want to repeat in infinitely, use a while true do loop, or, if you want to do it for all of the contents of a table, use a for i,v in pairs loop. The roblox wiki has great articles on all of the above. |
|
|
| Report Abuse |
|
|
|
| 29 Sep 2013 11:54 PM |
| Oh, if you do use a while true do loop, make sure to add at least a wait(.1) at the end if you don't have a wait in the script to keep down the lag. If you don't add one, it will crash roblox. |
|
|
| Report Abuse |
|
|
|
| 30 Sep 2013 12:08 AM |
Alright, Thanks.
"Do you enjoy heaps of dancing and frivolous diversions, cause I do, Sir or Ma'am." |
|
|
| Report Abuse |
|
|
|
| 30 Sep 2013 12:18 AM |
Thanks once again. You helped me create this.: local s = Instance.new("Sound")
while true do wait(5) s.Name = "Alert" s.SoundId = "http://www.roblox.com/asset/?id=130841492" s.Volume = 1 s.Looped = false s.archivable = false
s.Parent = game.Workspace
wait(30)
s:play() end
"Do you enjoy heaps of dancing and frivolous diversions, cause I do, Sir or Ma'am." |
|
|
| Report Abuse |
|
|
|
| 30 Sep 2013 12:23 AM |
:D Tip: s.Volume = 1 s.Looped = false Don't matter if you want them to be those values, it defaults to those. |
|
|
| Report Abuse |
|
|
|
| 30 Sep 2013 12:37 AM |
Alright, mind if I ask you one more thing?
"Do you enjoy heaps of dancing and frivolous diversions, cause I do, Sir or Ma'am." |
|
|
| Report Abuse |
|
|
| |
|
|
| 30 Sep 2013 12:42 AM |
I don't know how hard it is for you to answer, but lets say with that script I had set. Instead of wait, how could I have a random math value. Hopefully you understand what I mean. I'm not much of a scripter.
"Do you enjoy heaps of dancing and frivolous diversions, cause I do, Sir or Ma'am." |
|
|
| Report Abuse |
|
|
|
| 30 Sep 2013 12:44 AM |
You could use this, just change the two values: wait(math.random(minvalue,maxvalue)) |
|
|
| Report Abuse |
|
|
|
| 30 Sep 2013 12:49 AM |
Alright, thank you so much. If you want, I'll give you a copy of what this is making.
"Do you enjoy heaps of dancing and frivolous diversions, cause I do, Sir or Ma'am." |
|
|
| Report Abuse |
|
|
|
| 30 Sep 2013 12:50 AM |
So, if yo wanted to play that sound at a random interval 10 - 30 secs, this would be the best way, so you don't keep creating infinite sounds. :) :
local s = Instance.new("Sound") s.Name = "Alert" s.SoundId = "http://www.roblox.com/asset/?id=130841492" s.Parent = game.Workspace
while wait(math.random(10,30))do s:play() end
That should work, adding the wait in place of the true also makes it wait, it may be a bit hard to understand though. |
|
|
| Report Abuse |
|
|
|
| 30 Sep 2013 12:52 AM |
| I'm good, thanks though. :P I'm just here to help people who want to make things. |
|
|
| Report Abuse |
|
|