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 » Club Houses » Off Topic
Home Search
 

Re: conditional statements hate me and i hate them

Previous Thread :: Next Thread 
lagio is not online. lagio
Joined: 16 Jan 2010
Total Posts: 10296
27 Jun 2016 12:56 AM
tinkering with player-dependent scripts is a pain in the ass
Report Abuse
JoesephStratenburgh is not online. JoesephStratenburgh
Joined: 30 Sep 2014
Total Posts: 3057
27 Jun 2016 12:58 AM
ifPlayerisOP, then
Player = gaey


Report Abuse
lagio is not online. lagio
Joined: 16 Jan 2010
Total Posts: 10296
27 Jun 2016 12:58 AM
if script.Parent.SoundId ~= audios[1] and num > 0 and num <=4 then

end

Report Abuse
lagio is not online. lagio
Joined: 16 Jan 2010
Total Posts: 10296
27 Jun 2016 01:00 AM
repeat that about 4 more times and it still only plays audios[1]

im gonna get sick of listening to snowpoint city eventually
Report Abuse
jailbreak952 is not online. jailbreak952
Joined: 23 Aug 2009
Total Posts: 10885
27 Jun 2016 01:00 AM
if true then false
if false then true
Report Abuse
Coevality is not online. Coevality
Joined: 24 Jul 2011
Total Posts: 5630
27 Jun 2016 01:01 AM
wrong subforum
Report Abuse
0TForumer is not online. 0TForumer
Joined: 02 Oct 2013
Total Posts: 5346
27 Jun 2016 01:02 AM
what are you trying to do exactly

post full source and i can probably fix
Report Abuse
lagio is not online. lagio
Joined: 16 Jan 2010
Total Posts: 10296
27 Jun 2016 01:03 AM
@0T

i have another idea for a solution but ill ask for help if that doesnt work either
Report Abuse
krazymadwolf is not online. krazymadwolf
Joined: 22 Feb 2016
Total Posts: 4609
27 Jun 2016 01:06 AM
[ Content Deleted ]
Report Abuse
0TForumer is not online. 0TForumer
Joined: 02 Oct 2013
Total Posts: 5346
27 Jun 2016 01:17 AM
also, I'm pretty sure this is what you're doing so:

-- CONFIG:

soundLoops = false -- loop the playlist
soundIds = {123213, 123123, 123123, 123123} -- insert IDs here
soundDirectory = script.Parent -- where you want sound
soundWait = 1 -- seconds to wait before new song

-- CONSTANTS:

soundCurrent = 1 -- which song
soundPrefix = "http://www.roblox.com/asset/?id=" -- prefix for sound

-- CODE:


x = Instance.new("Sound", soundDirectory) -- make sound

function updateSongs()
x.SoundID = soundPrefix .. soundIds[soundCurrent]
x:Play()
end

updateSongs()

x.IsPlaying.Changed:connect(function(a)
if (a == false) then -- make sure it stops not starts
wait(soundWait) -- wait until new song
if not (soundCurrent >= #soundIds) then -- if there's another song
soundCurrent = soundCurrent + 1 -- change song
else -- if there isn't another song
if (soundLoops == true) then -- if it loops
soundCurrent = 1 -- go to first song
else -- if it doesn't
x:destroy() -- destroy the sound
break -- out of the loop
end
end
end
updateSongs()
end)

-- tell me if this doesn't work for you and tell me if this is the wrong script
Report Abuse
0TForumer is not online. 0TForumer
Joined: 02 Oct 2013
Total Posts: 5346
27 Jun 2016 01:19 AM
Also you're free to use the script. I'd appreciate credit but I'm pretty sure things like that exist in free models somewhere.

Sorry if this isn't what you wanted exactly.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Club Houses » Off Topic
   
 
   
  • 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