wish_z
(wish_z)
July 29, 2016, 8:43am
#1
Certain sound doesn’t play anymore, even though it did before.
onSoundLoaded cannot find SoundService Sound : rbxassetid://325182533
relevant function (localscript):
function scrolling()
local effect = Instance.new("Sound",script)
effect.SoundId = "rbxassetid://325182533"
effect.Pitch = math.random(75,85)/100
effect:Play()
effect:Destroy()
end
Brick_man
(Brick_man)
July 29, 2016, 9:02am
#2
From my experience it is from the sound being removed before it is finished playing. Doesn’t break anything, but still errors.
These threads were posted in the last 2 days about the same issue (use the search!):
http://devforum.roblox.com/t/new-sounds-messed-up/27419
My game hasn’t had this bug until today, and I haven’t updated it for 3 days. It apparently always happens while someone is shooting their ship. No idea what could be causing it… How is it I view the crashlog again?
All sounds no longer play for anyone, besides music played in the player’s PlayerGui. Here are a few things that popped up in the Local Log (nothing was in Server Log)
[image]
Also I got this weird VR-related bug, but I’m currently not using a VR device in-game.
[image]
More information on sound updates to be found on this thread:
I’m excited to announce some upcoming changes to the Sound object.
[Capture.PNG]
Sound.Playing
A new read/write value that will definitively tell whether the sound is playing or not.
This value is serialized, so it can be set in studio to create a background music or ambience scriptlessly.
This value is replicated, so for any Sound that has been in the workspace any changes will propagate to server and client.
This value will properly work on the server.
IsPaused/IsPlaying will be read-on…
Here is the relevant staff reply regarding your issue
This was something that a very small number of games did and really shouldn’t ever have. I’ve intentionally changed it in the name of progress, so the idea is that any sound you hear should be directly tied to an existing Sound in the workspace (or a PlayOnRemove trigger).
So, for time being this is a won’t fix.
Can I suggest you use PlayOnRemove instead? Seems like exactly what you wanted to do.
http://wiki.roblox.com/index.php?title=API:Class/Sound/PlayOnRemove
TLDR; Don’t play the sound and then immediately destroy it afterwards. Instead, set Sound::PlayOnRemove to true, then destroy the sound.
2 Likes
spotco
(spotco)
July 29, 2016, 5:59pm
#4
this, if you need that behaviour use PlayOnRemove.
wish_z
(wish_z)
July 29, 2016, 7:59pm
#5
The sound plays now after changing Sound:Play()
to Sound.RemoveOnPlay = true
, but the error still prints to console.
spotco
(spotco)
July 29, 2016, 11:17pm
#6
Got it. The error message will be changed/fixed to better describe the problem in the future.
Also add a wait to stop the error print.
1 Like