LocalScript sound not playing on client RemoteEvent

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:

image

image

4 Likes

do you get any asset id error?

No errors of any kind. I went through the Audio Discovery tab as well.

1 Like

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

1 Like

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.

1 Like

Here it is: rbxassetid://9043338527

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.