I’m currently testing a jumpscare system for my game in which the trigger for my NPC will fire a RemoteEvent on the player who touched it. Currently, the UI elements appear and disappear as expected. However, the sound that I want to play LOCALLY does not play at all despite the volume being higher than zero. Here is my code:
do you get any asset id error?
No errors of any kind. I went through the Audio Discovery tab as well.
Is the Sound’s IsLoaded property set to true
? If it isn’t, then try preloading it using the ContentProvider service, and if that doesn’t work, try reuploading the sound file with a different name or format
If it is set to true, then make sure that you’re playing the correct sound, or that its RollOffMaxDistance
and RollOffMinDistance
is set to a reasonable amount
Try waiting until the AssetID of the sound gets loaded by using Sound.IsLoaded
.
local sound = ... --// Path to sound
if not sound.IsLoaded then
sound.Loaded:Wait()
end
sound:Play()
IsLoaded is currently set to true. The sound itself was also uploaded by Roblox, so it isn’t a sound file that I can re-upload.
Are there any errors in the output, and does it work if you manually play it while play-testing?
Give me soundID, Imma try it out
Try setting the parent as the script to make sure there are no errors with it being the workspace, just make sure you change to sound variable to be
script:WaitForChild("Jumpscare")
No errors of any kind, client or server-side. It plays while play-testing.
Here it is: rbxassetid://9043338527
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.