Garry's Mod

Garry's Mod

View Stats:
My Nextbot's Sounds are not working
I made a nextbot, and it works. However, none of the sounds play when it's spawned.
I have already changed them to be "Project rate HZ 44100" on audacity and I made sure that all of the file names were spelled correctly and that they were in the lua file. I can't find anything online so I'm not sure what to do, and I really want to fix this as quickly as possible, any tips?
< >
Showing 1-6 of 6 comments
kopibara77 Aug 1, 2022 @ 2:13pm 
When any invalid sound is played, a red line of text is printed into your console.

It will probably tell what's the problem

I, by using my telepathy, suspect that you specified the wrong path to sound file.

self:EmitSound("sound/reload.wav", 75, 100, 1) -- WRONG!!! self:EmitSound("reload.wav", 75, 100, 1) -- right :)

Basically all sounds are already releative to 'sound' folder in your addon.

This happened to me way often than it should...
Natetheninja Aug 12, 2022 @ 7:27pm 
Would this also apply to "util.PrecacheSound ("sound/nextbot/sound.mp3")" by any chance?
I changed "self:emit" like you said, but the sound still didn't work, so my assumption is that it has something to do with the "util.PrecacheSound" code.
kopibara77 Aug 13, 2022 @ 7:04am 
oh, that explains everything, this function is broken and no longer works.

From official wiki[wiki.facepunch.com]:

BUG Broken on purpose because hitting the limit above causes the server to shutdown

BUG Ultimately does nothing on client, and only works with sound scripts, not direct paths.

You can use Sound function, it works for sure:
local reload = Sound("ak47/reload.wav") -- releative to sound folder, remember.

Or you can play sounds directly, duh.

Good luck.
Last edited by kopibara77; Aug 13, 2022 @ 7:19am
Poyopoop Nov 1, 2022 @ 10:22pm 
I'm getting the same problem too. The script I'm using to run the nextbot uses the same 'Sound()' function you mentioned, the names are spelled correctly, and the music is set to 44100 HZ. Yet it doesn't work. It's only the music that seems to have this problem too, as the taunt and jump sound effects seem to work just fine. The game doesn't even give me any errors either, making it harder to track down why it's not working. I guess it's the way how the nextbot is scripted to play its music? But some of my other nextbots use the same script and they seem to work fine.

I honestly don't know what to do and am seriously stumped. :steamsad:
ROMAN GAMING Apr 16, 2023 @ 3:34am 
Invalid sample rate (48000) for sound
ConductorEli Jun 20, 2024 @ 7:00pm 
Could anyone modify my next it I’m making to fix the sound because I’m having the same problem
< >
Showing 1-6 of 6 comments
Per page: 1530 50

Date Posted: Aug 1, 2022 @ 1:35pm
Posts: 6