So, I was wondering if it would be possible to ban certain audios from being played inside a ROBLOX game, as people have been playing crash audios inside of my game which crashes the whole server.
I am not too sure how I could manage to script this, but I have searched through some of the devforum for an answer, yet I haven’t found anything.
If I found out a way, I could put them to a block list inside of my game.
I have tried to play around with some of the code that people have replied with but I haven’t found anything to work.
Here is my code so far:
local bannedaudio = {
ID here;
ID here;
ID here;
}
if (table.find(bannedaudio, id)) then
game.Players.LocalPlayer:Kick("Please don't play crash audios.")
end
I am probably going to come back later/tommorow to see if I can fix it.
I have finally got a temp-fix for this, thanks to all the people who have replied here to help me.
I hope someone finds this useful if they are trying to block certain audios from being played inside their game, which they will be able to figure it out by viewing the past replies.