Keyrut
|
  |
| Joined: 23 Nov 2011 |
| Total Posts: 6501 |
|
|
| 04 Feb 2013 05:03 PM |
s1 = "http://www.roblox.com/asset/?id=1280463" s2 = "http://www.roblox.com/asset/?id=2027611" s3 = "http://www.roblox.com/asset/?id=2303479" s4 = "http://www.roblox.com/asset/?id=1372260" s5 = "http://www.roblox.com/asset/?id=1077604" s6 = "http://www.roblox.com/asset/?id=1280473" s7 = "http://www.roblox.com/asset/?id=1372257" s8 = "http://www.roblox.com/asset/?id=1372259" s9 = "http://www.roblox.com/asset/?id=1280414" s10 = "http://www.roblox.com/asset/?id=1372261" s11 = "http://www.roblox.com/asset/?id=1372262" s12 = "http://www.roblox.com/asset/?id=1015394" s13 = "http://www.roblox.com/asset/?id=1034065" s14 = "http://www.roblox.com/asset/?id=5982975" s15 = "http://www.roblox.com/asset/?id=5986151" s16 = "http://www.roblox.com/asset/?id=27697277" s17 = "http://www.roblox.com/asset/?id=27697392" s18 = "http://www.roblox.com/asset/?id=11420922" s19 = "http://www.roblox.com/asset/?id=27697267" s20 = "http://www.roblox.com/asset/?id=27697719" s21 = "http://www.roblox.com/asset/?id=27697298" s22 = "http://www.roblox.com/asset/?id=27697743" s23 = "http://www.roblox.com/asset/?id=27697735" s24 = "http://www.roblox.com/asset/?id=27697713" s25 = "http://www.roblox.com/asset/?id=8610025" s26 = "http://www.roblox.com/asset/?id=27697234" s27 = "http://www.roblox.com/asset/?id=5985787" s28 = "http://www.roblox.com/asset/?id=11420933" s29 = "http://www.roblox.com/asset/?id=11231513" s30 = "http://www.roblox.com/asset/?id=9650822"
while true do if script.Tst.IsPlaying == false then script.Tst.SoundId = s1 or script.Tst.SoundId == s2 or script.Tst.SoundId == s3 or script.Tst.SoundId == s4 or script.Tst.SoundId == s5 or script.Tst.SoundId == s6 or script.Tst.SoundId == s7 or script.Tst.SoundId == s8 or script.Tst.SoundId == s9 or script.Tst.SoundId == s10 or script.Tst.SoundId == s11 or script.Tst.SoundId == s12 or script.Tst.SoundId == s13 or script.Tst.SoundId == s14 or script.Tst.SoundId == s15 or script.Tst.SoundId == s16 or script.Tst.SoundId == s17 or script.Tst.SoundId == s18 or script.Tst.SoundId == s19 or script.Tst.SoundId == s20 or script.Tst.SoundId == s21 or script.Tst.SoundId == s22 or script.Tst.SoundId == s23 or script.Tst.SoundId == s24 or script.Tst.SoundId == s25 or script.Tst.SoundId == s26 or script.Tst.SoundId == s27 or script.Tst.SoundId == s28 or script.Tst.SoundId == s29 or script.Tst.SoundId == s30 script.Tst:Play() end
(i blame the or's) Anyone know what I did wrong lol |
|
|
| Report Abuse |
|
|
Keyrut
|
  |
| Joined: 23 Nov 2011 |
| Total Posts: 6501 |
|
| |
|
777MrEpic
|
  |
| Joined: 17 Oct 2012 |
| Total Posts: 3998 |
|
| |
|
Keyrut
|
  |
| Joined: 23 Nov 2011 |
| Total Posts: 6501 |
|
|
| 04 Feb 2013 05:30 PM |
This isn't the forum you're looking for. I believe you're looking for either LMaD, RT, OT, or ATR.
|
|
|
| Report Abuse |
|
|
|
| 04 Feb 2013 05:33 PM |
| Wow.. that is a mess.. You're using "or" wrong. |
|
|
| Report Abuse |
|
|
Keyrut
|
  |
| Joined: 23 Nov 2011 |
| Total Posts: 6501 |
|
|
| 04 Feb 2013 05:35 PM |
Thought so, I've never used 'or' before first time lol. Could you help me get this into proper shape? |
|
|
| Report Abuse |
|
|
|
| 04 Feb 2013 05:42 PM |
s1 = "http://www.roblox.com/asset/?id=1280463" s2 = "http://www.roblox.com/asset/?id=2027611" s3 = "http://www.roblox.com/asset/?id=2303479" s4 = "http://www.roblox.com/asset/?id=1372260" s5 = "http://www.roblox.com/asset/?id=1077604" s6 = "http://www.roblox.com/asset/?id=1280473" s7 = "http://www.roblox.com/asset/?id=1372257" s8 = "http://www.roblox.com/asset/?id=1372259" s9 = "http://www.roblox.com/asset/?id=1280414" s10 = "http://www.roblox.com/asset/?id=1372261" s11 = "http://www.roblox.com/asset/?id=1372262" s12 = "http://www.roblox.com/asset/?id=1015394" s13 = "http://www.roblox.com/asset/?id=1034065" s14 = "http://www.roblox.com/asset/?id=5982975" s15 = "http://www.roblox.com/asset/?id=5986151" s16 = "http://www.roblox.com/asset/?id=27697277" s17 = "http://www.roblox.com/asset/?id=27697392" s18 = "http://www.roblox.com/asset/?id=11420922" s19 = "http://www.roblox.com/asset/?id=27697267" s20 = "http://www.roblox.com/asset/?id=27697719" s21 = "http://www.roblox.com/asset/?id=27697298" s22 = "http://www.roblox.com/asset/?id=27697743" s23 = "http://www.roblox.com/asset/?id=27697735" s24 = "http://www.roblox.com/asset/?id=27697713" s25 = "http://www.roblox.com/asset/?id=8610025" s26 = "http://www.roblox.com/asset/?id=27697234" s27 = "http://www.roblox.com/asset/?id=5985787" s28 = "http://www.roblox.com/asset/?id=11420933" s29 = "http://www.roblox.com/asset/?id=11231513" s30 = "http://www.roblox.com/asset/?id=9650822"
while true do N = math.random(30) if script.Tst.IsPlaying == false then script.Tst.SoundId = s(N) script.Tst:Play() end
I'm not 100% sure, but this may work. If it doesn't give me the Output. |
|
|
| Report Abuse |
|
|
Keyrut
|
  |
| Joined: 23 Nov 2011 |
| Total Posts: 6501 |
|
|
| 04 Feb 2013 05:47 PM |
| Thanks, I'll need to use the math.random more. |
|
|
| Report Abuse |
|
|
|
| 04 Feb 2013 05:48 PM |
Example of "or" statement
function derp() if i == 1 or i == 2 then print("i is equal to 1, or 2") else print("i is not equal to 1, or 2") end end
derp() |
|
|
| Report Abuse |
|
|
Keyrut
|
  |
| Joined: 23 Nov 2011 |
| Total Posts: 6501 |
|
|
| 04 Feb 2013 05:53 PM |
17:52:15.833 - Workspace.Script:35: attempt to call global 's' (a nil value) Oh boy. |
|
|
| Report Abuse |
|
|
|
| 04 Feb 2013 05:58 PM |
script.Tst.SoundId = s(N)
Should be:
script.Tst.SoundId = (N) |
|
|
| Report Abuse |
|
|
|
| 04 Feb 2013 06:02 PM |
local Sounds = { "http://www.roblox.com/asset/?id=1280463" , "http://www.roblox.com/asset/?id=2027611" , "http://www.roblox.com/asset/?id=2303479" , "http://www.roblox.com/asset/?id=1372260" , "http://www.roblox.com/asset/?id=1077604" , "http://www.roblox.com/asset/?id=1280473" , "http://www.roblox.com/asset/?id=1372257" , "http://www.roblox.com/asset/?id=1372259" , "http://www.roblox.com/asset/?id=1280414" , "http://www.roblox.com/asset/?id=1372261" , "http://www.roblox.com/asset/?id=1372262" , "http://www.roblox.com/asset/?id=1015394" , "http://www.roblox.com/asset/?id=1034065" , "http://www.roblox.com/asset/?id=5982975" , "http://www.roblox.com/asset/?id=5986151" , "http://www.roblox.com/asset/?id=27697277" , "http://www.roblox.com/asset/?id=27697392" , "http://www.roblox.com/asset/?id=11420922" , "http://www.roblox.com/asset/?id=27697267" , "http://www.roblox.com/asset/?id=27697719" , "http://www.roblox.com/asset/?id=27697298" , "http://www.roblox.com/asset/?id=27697743" , "http://www.roblox.com/asset/?id=27697735" , http://www.roblox.com/asset/?id=27697713" , "http://www.roblox.com/asset/?id=8610025" , "http://www.roblox.com/asset/?id=27697234" , "http://www.roblox.com/asset/?id=5985787" , "http://www.roblox.com/asset/?id=11420933" , "http://www.roblox.com/asset/?id=11231513" , "http://www.roblox.com/asset/?id=9650822" } script.Tst.Changed:connect(function( ) if not script.Tst.IsPlaying then script.Tst.SoundId = Sounds[math.random(#Sounds)] script.Tst:Play() end end )
Something like that. . .
¤ ¤ † K M <( •д• )> X D † ¤ ¤ |
|
|
| Report Abuse |
|
|
Keyrut
|
  |
| Joined: 23 Nov 2011 |
| Total Posts: 6501 |
|
|
| 04 Feb 2013 06:03 PM |
@The Then how will it find the music each is labled s# so wouldn't script.Tst.SoundId = s(N) be correct? :l |
|
|
| Report Abuse |
|
|
|
| 04 Feb 2013 06:03 PM |
I've missed a comma.
local Sounds = {
"http://www.roblox.com/asset/?id=1280463" , "http://www.roblox.com/asset/?id=2027611" , "http://www.roblox.com/asset/?id=2303479" , "http://www.roblox.com/asset/?id=1372260" , "http://www.roblox.com/asset/?id=1077604" , "http://www.roblox.com/asset/?id=1280473" , "http://www.roblox.com/asset/?id=1372257" , "http://www.roblox.com/asset/?id=1372259" , "http://www.roblox.com/asset/?id=1280414" , "http://www.roblox.com/asset/?id=1372261" , "http://www.roblox.com/asset/?id=1372262" , "http://www.roblox.com/asset/?id=1015394" , "http://www.roblox.com/asset/?id=1034065" , "http://www.roblox.com/asset/?id=5982975" , "http://www.roblox.com/asset/?id=5986151" , "http://www.roblox.com/asset/?id=27697277" , "http://www.roblox.com/asset/?id=27697392" , "http://www.roblox.com/asset/?id=11420922" , "http://www.roblox.com/asset/?id=27697267" , "http://www.roblox.com/asset/?id=27697719" , "http://www.roblox.com/asset/?id=27697298" , "http://www.roblox.com/asset/?id=27697743" , "http://www.roblox.com/asset/?id=27697735" , "http://www.roblox.com/asset/?id=27697713" , "http://www.roblox.com/asset/?id=8610025" , "http://www.roblox.com/asset/?id=27697234" , "http://www.roblox.com/asset/?id=5985787" , "http://www.roblox.com/asset/?id=11420933" , "http://www.roblox.com/asset/?id=11231513" , "http://www.roblox.com/asset/?id=9650822"
}
script.Tst.Changed:connect(function( ) if not script.Tst.IsPlaying then script.Tst.SoundId = Sounds[math.random(#Sounds)] script.Tst:Play() end end )
¤ ¤ † K M <( •д• )> X D † ¤ ¤ |
|
|
| Report Abuse |
|
|
Keyrut
|
  |
| Joined: 23 Nov 2011 |
| Total Posts: 6501 |
|
|
| 04 Feb 2013 06:06 PM |
@Knight I'll try that out, Thanks! |
|
|
| Report Abuse |
|
|
Keyrut
|
  |
| Joined: 23 Nov 2011 |
| Total Posts: 6501 |
|
|
| 04 Feb 2013 06:53 PM |
OK new problem, The script works, it runs in studio, flaw, it doesn't run in Play.
|
|
|
| Report Abuse |
|
|