8/28/2015: im sorry that i cant put the script i tried up here i think im having a malwhere problem and roblox studio is not opening 8/29/2015: ok studio is working again and i tried this one and its not working
Variable=Instance.new("Sound".game.Workspace) Varible.Soundid"rbxassetid://142830552" Verible:play() loop:false
im trying to make it so the music will play no loop when the player enters the server
Well first off, This isn't a request site, But I will link you to some things you might need.
wiki link to audio: http://wiki.roblox.com/index.php?title=Sound
You're going to need to make the audio spawn in with a new instance (http://wiki.roblox.com/index.php?title=Instance), Then you're going to make that into every player that joins (http://wiki.roblox.com/index.php?title=API:Class/Players/PlayerAdded)
OR
You could go the more generic route and just put it in a block edit the ID then play it
Here's an example:
game.Players.PlayerAdded:connect(function(plr) local newmusic = Instance.new("Sound") newmusic.Parent = plr.Name newmusic.SoundId = "IDHERE" newmusic:Play() end)
Simple, Paste the music you want into workspace, with the correct id= number and such. Then put a script into the sound. It should be like this.
wait(1) --I do this because sometimes it crashes if you don't script.Parent:Play()
TAAAADAAAA
Or if you only want it to go at certain times you can put a script into workspace that activates it like.
For this example its for every 2 minutes it will play.
wait() while true do wait(120) game.Workspace.Sound:Play() --Has to be specific name of your sound/music --Remember for this you have to uncheck looped
Easy. In StarterGui, make a local script. Then in the script, put the following:
game.Workspace.Sound:Play()
If "Sound" has a different name then replace "Sound" with the name of your sound. If you want it to keep going you should go to the properties of the sound and tick the looped box.
If you want just get an admin script and find the id and play :music [ID-GOES HERE], or if you want to do it from Studio, get a sound in Workspace, add the code into it where it says asset/id, then get a script inside of it saying:
`while true do wait (1) script.Parent:play() script:destory()
end`
Easy put the audio in workspace and then put the id in the sound click loop if you want. Now comes the scripting part. It is super hard.
game.Workspace.Sound:Play()-- if you changed the name of the Sound object change Sound to the name you changed it.