Is it possible to make a script where a song loops but the song is from youtube?
Yes, download the audio of the song, and then upload it to Roblox. Itâs the easiest way.
EDIT: @brokenVectors explains it much better and which much more detail-
Yes, you could upload a song from YouTube onto Roblox as @Macawmangrovve12 stated, however you need to make sure that the song isnât copyrighted. After youâve uploaded it, go into the toolbox and click here:
This will lead you to your inventory. Now you want to click on the dropdown, and go here on My Audio:
Find the desired audio, right click on it and press âCopy Asset Idâ:
Now you want to insert a new Sound object into Workspace. You can do this by pressing Ctrl + I. A big menu should appear now. Enter the word âSoundâ into the searchbar, press enter and bam! Youâve got a new Sound object in the Workspace.
Now go to Properties, scroll down to SoundId. Click the box on the right, you should now see this:
Press Ctrl + V on your keyboard, and your sound ID should be entered.
Scroll to the Playing and Looped property. Tick their checkboxes and you should now see this:
Now if you test your game, the audio should now be playing, and itâll also loop. Hope this helped!
However, you cannot randomly pick the sound assets from YouTube, because they are two different environments. Uploaded audios on Roblox should do the trick but hence that the audio might be copyrighted, making it near impossible to upload.