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: Audio Script Help:

Previous Thread :: Next Thread 
FunBeta is not online. FunBeta
Joined: 04 Oct 2013
Total Posts: 1319
11 Oct 2013 01:25 PM
while true do
wait(10)
script.MUSIC:Play()
end


How do I edit this and does it repeat the music? Is there anyway for it to change musics too?
Report Abuse
FunBeta is not online. FunBeta
Joined: 04 Oct 2013
Total Posts: 1319
11 Oct 2013 01:29 PM
Bump.
Report Abuse
FunBeta is not online. FunBeta
Joined: 04 Oct 2013
Total Posts: 1319
11 Oct 2013 01:35 PM
Bump2.
Report Abuse
Unication is not online. Unication
Joined: 29 Mar 2013
Total Posts: 5897
11 Oct 2013 01:37 PM
Alternate:

kk = true --Change this to true if you want it to play music!

if kk == true then
s = Instance.new("Sound")

s.Name = "BGMusic"
s.SoundId = "http://www.roblox.com/asset/?id=2303479" --SoundID here.
s.Volume = 1
s.Looped = true
s.Archivable = true

s.Parent = game.Workspace


while true do
wait(.2)
s:play()

wait(60)-- Time where music should stop and loop again.
s:Pause()
end end

http://www.youtube.com/watch?v=hod0WtYE4SA <-- What's really good!?!?!?
Report Abuse
FunBeta is not online. FunBeta
Joined: 04 Oct 2013
Total Posts: 1319
11 Oct 2013 01:39 PM
Thanks so much easier. But id there a way to make it change sound.
Report Abuse
funnymouse7 is not online. funnymouse7
Joined: 17 Mar 2011
Total Posts: 1741
11 Oct 2013 01:39 PM
Im not too familiar with sounds but, find out how long the song is then do this

Howlongissong = 30

wait(5)

while true do
script.MUSIC:Play()
wait(Howlongissong)
script.MUSIC:Pause()
end


that will repeat but im not sure if theres a repeat property in music, if there is u can make this way shorter like 3-4 words
Report Abuse
FunBeta is not online. FunBeta
Joined: 04 Oct 2013
Total Posts: 1319
11 Oct 2013 01:43 PM
How do I insert the song into the script?
Report Abuse
crouton04 is not online. crouton04
Joined: 07 Jul 2010
Total Posts: 4459
11 Oct 2013 01:43 PM
Theres a loop property in a sound.
Report Abuse
Unication is not online. Unication
Joined: 29 Mar 2013
Total Posts: 5897
11 Oct 2013 01:45 PM
"Theres a loop property in a sound."

Counter argument: "s.Looped = true"

http://www.youtube.com/watch?v=hod0WtYE4SA <-- What's really good!?!?!?
Report Abuse
FunBeta is not online. FunBeta
Joined: 04 Oct 2013
Total Posts: 1319
11 Oct 2013 01:45 PM
Where do I get the id?
Report Abuse
crouton04 is not online. crouton04
Joined: 07 Jul 2010
Total Posts: 4459
11 Oct 2013 01:47 PM
What?

What i said wasn't stating the properties name. I was just saying that there is a property that can loop a sound.
Report Abuse
FunBeta is not online. FunBeta
Joined: 04 Oct 2013
Total Posts: 1319
11 Oct 2013 01:47 PM
Ok So here is the script I am going to use. How do I get the ID and is there a way to make it switch sounds.

kk = true --Change this to true if you want it to play music!

if kk == true then
s = Instance.new("Sound")

s.Name = "BGMusic"
s.SoundId = "http://www.roblox.com/asset/?id=2303479" --SoundID here.
s.Volume = 1
s.Looped = true
s.Archivable = true

s.Parent = game.Workspace


while true do
wait(.2)
s:play()

wait(0.1)-- Time where music should stop and loop again.
s:Pause()
end end
Report Abuse
Unication is not online. Unication
Joined: 29 Mar 2013
Total Posts: 5897
11 Oct 2013 01:48 PM
Just change the asset numerals "2303479" to your desired SoundID's digits. Simple.

http://www.youtube.com/watch?v=hod0WtYE4SA <-- What's really good!?!?!?
Report Abuse
FunBeta is not online. FunBeta
Joined: 04 Oct 2013
Total Posts: 1319
11 Oct 2013 01:52 PM
Yes but how do I make it switch music?
Report Abuse
Unication is not online. Unication
Joined: 29 Mar 2013
Total Posts: 5897
11 Oct 2013 02:10 PM
I'm not accurate on this, but here's a possible mathematical conclusion to switch music.

If you got two Music scripts, the values of Line_16 and 19 for the first music script will be left alone.

The second Music script should have value on Line_16 to be x+5 more than Line_16 in the first script. For Line_19, then it should have a value of y+j meaning that both values from Line_16 in the first music script and Line_19's own music length should be combined together.

Let value "x" be first music script's Line_16
Let value "y" be first music script's Line_19
Let value "j" be second music script's Line_19

http://www.youtube.com/watch?v=hod0WtYE4SA <-- What's really good!?!?!?
Report Abuse
AZant2 is not online. AZant2
Joined: 04 Jul 2010
Total Posts: 878
26 Jan 2014 11:16 PM
Or you can copy and paste a bunch if you are a novice scripter...
Report Abuse
UndeadNinjaX is not online. UndeadNinjaX
Joined: 06 Nov 2013
Total Posts: 66
06 Mar 2014 01:04 AM
print("Ragdoll Physics Loaded")
function OnEntered(Player)
    while Player.Character == nil do
        wait()
    end
    wait(1)
    Player.Changed:connect(function(Property)
        if Property == "Character" then
            if Player.Character then
                local Mods = script:GetChildren()
                for X = 1, # Mods do
                    if Mods[X].className == "Script" or Mods[X].className == "LocalScript" then
                        local S = Mods[X]:Clone()
                        S.Disabled = false
                        S.Parent = Player.Character
                    end
                end
            end
        end
    end)
    local Mods = script:GetChildren()
    for X = 1, # Mods do
        if Mods[X].className == "Script" or Mods[X].className == "LocalScript" then
            local S = Mods[X]:Clone()
            S.Disabled = false
            S.Parent = Player.Character
        end
    end
end
game.Players.ChildAdded:connect(OnEntered)
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
06 Mar 2014 01:08 AM
@undead
Not ANYTHING NEAR what he was asking..
Report Abuse
BlueJazz10 is not online. BlueJazz10
Joined: 31 Aug 2013
Total Posts: 3
06 Jun 2014 06:11 PM
I need help on frozen putting two songs combined in the background as looped. Idk how to type a script can someone help me?
Report Abuse
wolfpackleader64 is not online. wolfpackleader64
Joined: 01 Jul 2012
Total Posts: 2
19 Jun 2014 09:04 AM
i need help on how to get it to play when i click on a button
Report Abuse
theDEVILjsb is online. theDEVILjsb
Joined: 01 May 2012
Total Posts: 158
25 Aug 2014 12:32 PM
tank u so muchus
Report Abuse
BlackHoleDragon is not online. BlackHoleDragon
Joined: 15 Aug 2008
Total Posts: 85
03 Nov 2014 08:51 AM
Hate to revive an old thread, but now I need help, you see I need a music button that when you step on it, it plays looped music so there isn't a pause when the music loops.
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