I know that it has been asked many times how to check if an ID is valid, but all the solutions miss one thing.
I know that I can check the name of the product with marketplace service to tell if it is “Content Deleted” or “Removed for Copyright”. However, there is one more thing that can cause an ID to not play and that is if it is a stereo as Roblox made it so only mono tracks work.
When these tracks fail to play, they error with error 46 and LogService can be used to detect this.
However, my issue is that this error only appears on the client. Even if I create a sound instance on the server and set the id there, the error only appears on the client. This is an issue because if I have logic that deletes people’s data when the song breaks, I have to put this on the client and then an exploiter can cause a fake error with the Error command and trick it into deleting the data.
Is there any way I can reliably detect this Error 46 from the server and be 100% sure that the audio is actually broken? Thanks.
This is a tricky question to answer but why are you deleting the players data upon the error of a sound in the first place? I believe there might be a better way around this problem rather than relying on LogService.
Could you perhaps send a remote out to all players and then make your decision based on the majority? This way, if there’s 1 exploiter in the lobby then they’ll be overruled. The only situation in which this would be bad is if there are multiple exploiters in the lobby who all collaboratively work together in succession, however that’d be hard and I doubt somebody would go to all that effort for something like this.
Thanks but to my knowledge pcall only catches errors and prevents haulting from errors thrown within the pcall. Also, this post only checks if the Id exists, not if it is removed for any reason. Checking the song length after is not reliable as this would happen even if the sound files to load due to internet.