function chat(msg) local word = "play" if string.find(msg,word) then local converted = tonumber(msg) print (converted) sound.SoundId = "rbxassetid://"..converted sound:Play() print (converted) end end player.Chatted:Connect(chat)
Getting this error.
22:06:59.563 - Workspace.Script:26: attempt to concatenate local 'converted' (a nil value) 22:06:59.564 - Stack Begin 22:06:59.564 - Script 'Workspace.Script', Line 26 22:06:59.565 - Stack End
I also want to convert a string to have no letters only numbers so i can feed the string to SoundId without errors.