How to skip copyrighted song (Fixed look for help)

I’m trying to make a copyright song protection
I have this which works but not good enough is there a better way to make this?

It messes up if many copyrighted songs are played right after by skipping a few songs and sometimes skips 1 more song than what it is suppose to if just 1

and no I don’t wanna check asset name as people still can change those when songs are copyrighted!!

1 Like

I don’t know how you check if it’s copyrighted, but you probably can put a table with IDs that are copyrighted and check each sound and if they match they skip or get deleted.

2 Likes

Fixed

Local Sound = YourSoundHere
Local LogService = game:GetService("LogService ")

 local function onMessageOut(message, messageType)
    if not messageType == Enum.MessageType.MessageError then
        return
    end
    local pattern = "Failed to load sound " .. Sound.SoundId .. ": Unable to download sound data"
    if not string.find(message, pattern, 1, true) then
        return
    end


    -- do whatever here!!!
        -- like play a new song or which ever functuion you use to play the next song in the queue

end

LogService.MessageOut:Connect(onMessageOut)-
2 Likes