Simple Music Script Trouble

Over the past few weeks I’ve been trying my hardest to learn lua. Below is my first attempt at my own script. Problems are arising for me though. I’ve tested it within garrys mod and used the console to look for bugs. But my problem is that the sounds are not being called. Any help would be appreciated and I’m only really looking to be pointed in the right direction.

Thanks for taking the time to read this post!

Try this:

function EndOfRoundMusic()
        local inno = Sound("dramatic.wav")
        local trait = Sound("dramatic.wav")
        local time = Sound("dramatic.wav")
        if client then
                if TTTEndRound == WIN_INNOCENT then
                elseif TTTEndRound == WIN_TRAITOR then
                elseif TTTEndRound == WIN_TIMELIMIT then

hook.Add ("TTTEndRound", "EndOfRoundMusic", EndOfRoundMusic)

Apologies for the late response. Still a no go. I’m extremely confused as to why it isn’t working. Maybe it is it’s position within autorun, might it have to be placed in the client folder? Gah! Thank you anyway kind stranger!

Here’s one I give away to help people learn: – Feel free to learn from it and use it! Your home-work goal: Create a shared file, with the list of songs. This way you can send a shorter amount of data to the client ( ie the win_type and the index of the song, instead of the full song name ).


Here’s a kill notifier to learn from as well: