Why is the sound not playing?

so i want to make a command so when you say play and then an id like play 000000000
then it would play the sound.
well…
everything EXCEPT playing the sound works
it makes a sound,it sets the id to the id in the chat,it waits until it’s loaded,
but it doesn’t play the sound.
anyone know what the error is here?

Commands.play = function(sender,arguments)--commands is the table 
	local Sound = Instance.new("Sound",workspace)
	local SoundID = arguments[1]
	Sound.SoundId = tonumber(SoundID)
	repeat wait() until Sound.IsLoaded == true 
	Sound:Play()--issue
end

thanks in advance.

Set the sound id like this:

Sound.SoundId = "rbxassetid://"..SoundId
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.