Play a sound on ban.

So I use to use a code awhile back on how to play a sound when a player gets banned. And this is the current code I have down below. The issue with it is that it plays the sound but doesn’t Kick/Ban them from the server. It just plays the sound and it shows they were banned in chat but really never was banned. Any fixes? ( I use ULX/Ulib )

local meta = FindMetaTable( “Player” )
local sound = “siege/jihad.wav”

meta._ban = meta._ban or meta.Ban
meta._kick = meta._kick or meta.Kick

local function playSound( )
BroadcastLua ( “surface.PlaySound ( '” … sound … “’)” )

function meta:Ban( minutes, kick )
meta._ban( minutes, kick )

function meta:Kick( reason )
meta._kick( reason )

ULX overrides the ban function by itself iirc, so this conflicts with the override.

So how can I have a code that when banned it plays the sound?

Override/Edit the ULX that overrides the ban function.

I assume I remove that code and insert the code I put above?

No, modify the function linked to play the sound.

Sorry, I don’t have a strong knowledge base on LUA. So i’m unsure how to do so.