I made a script to play an audio by id. It’s not working, can someone tell me why?
local folder = script.Parent.MusicPlayer
local tb = script.Parent.Parent.TextBox
local id = tb.Text
folder.Parent = workspace
script.Parent.MouseButton1Click:Connect(function()
folder.Music.SoundId = "rbxassetid://" .. id
folder.Music:Play()
end)
An ID doesn’t need rbxassetid:// attached. Firstly, doing that changes it from a number value to a string, and secondly it just doesn’t need that to work. :IsPlayerInGroup() doesn’t use a group link, just the ID.