I have a sound in my game. It works in Studio but not in Play mode. Help?
Script:
while true do
local sound = Instance.new("Sound")
sound.SoundId = "http://www.roblox.com/asset/?id=27697743"
sound.Parent = game.Soundscape
sound:Play()
wait (120)
end
I have a sound in my game. It works in Studio but not in Play mode. Help?
Script:
while true do
local sound = Instance.new("Sound")
sound.SoundId = "http://www.roblox.com/asset/?id=27697743"
sound.Parent = game.Soundscape
sound:Play()
wait (120)
end
Your script appears to be running fine, the music is a bit quiet though.
Some of the code does seem kind of ugly, I'll clean it up for you.
--Make sure this is in a local script, and is in StarterPack, or StarterGui.
local sound = Instance.new("Sound")
sound.SoundId = "http://www.roblox.com/asset/?id=27697743"
sound.Parent = game.Soundscape
sound:Play()
sound.Looped = true --Now the song can play over and over again, without while true do.
sound.Volume = 2 --Not sure how well this will work, but hopefully it will make it sound better.
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
Thank you so much! This is the game: http://web.roblox.com/Paintball-Tycoon-ALPHA-place?id=172937144