local relaxid = "231311947" function playmusic(id, replay) playing = true if game.Workspace:FindFirstChild("music") then game.Workspace:FindFirstChild("music"):Stop() game.Workspace:FindFirstChild("music"):Destroy() end local music = Instance.new("Sound", game.Workspace) music.Name = "music" music.SoundId = id if replay == true then music.Looped = true else music.Looped = false end music:Play() end playmusic(relaxid, true)
The problem with this script is that it says that music.SoundId needs to be a string, and that id is an object. How would i turn id into a string?
Heres the problem I see. To use an sound Id, you will need the prefix rbxassetid:// before the song ID. So, your relaxid variable should be this.
local relaxid = 'rbxassetid://231311947'