Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

I need Sound Help?

Asked by 9 years ago

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

1 answer

Log in to vote
0
Answered by
M39a9am3R 3210 Moderation Voter Community Moderator
9 years ago

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.
0
Thank you so much! This is the game: http://web.roblox.com/Paintball-Tycoon-ALPHA-place?id=172937144 fight4money -2 — 9y
Ad

Answer this question