local Splitted = string.split(msg," ")
if Splitted == "!play" then
workspace.Sound.SoundId = Splitted
Even so, it means that the developer console won’t be bombarded by errors if someone decides to spam invalid IDs - in the case that they want to track an error, they could get the second returned variable of pcall when running the code.
My hyptotesis is that it doesnt work because; since you’re loading an Audio ID from the script, the audio takes some time to load but you play it instantly after inserting the id.
Try replacing the workspace.Sound:Play()
task.spawn(function() -- So it doesnt yield the rest of the script