Need some help

I have a darkrp server
So I really want to have it so when players get arrested the badboys song plays for them.
I was wondering if someone could help me with that, I am barely starting out my server and I want it to be as unique as possible.

What you’ll want to do is use the ‘playerArrested’ hook. This run server side every time any player is arrested, see here:

To use the hook, see here:

When you say “plays for them”, does that mean only the arrested player can hear the music? You have two options;
“EmitSound” - Sound will be emitted from the arrested player and everyone around them can hear it:

“PlaySound” - Only the player arrested can hear the sound, however this is client side only:


If you chose to use the “PlaySound” function, then you’ll have to network:

If you need any further help, you can add me on Steam below my avatar