Making song longer in script

Hello! I’m currently making a roblox game about guessing songs, but ive came across an issue. Basically, roblox doesnt let you upload songs over 6 seconds long, but that kind of ruins my game. In my game, the songs only play for around 10 seconds, so i was wondering on how i could make it so that 1 part of the song plays as 1 audio, and the second part of the song plays as the second audio.

I want to handle the 2 audio ids like this (or differently if needed, idk if that’ll work):

This is the main part of my script which plays the song:

			local correctSongNumber = math.random(1,#cloneSongs)
			local correctSong = cloneSongs[correctSongNumber]
			table.remove(cloneSongs,correctSongNumber)
			local correctSongName = correctSong.SongName
			local correctSongImage = correctSong.ImageID
			local correctSongID = correctSong.SongID
			local correctPossibeLength = correctSong.PossibleLength
			
			local groupFolder = game.Workspace.PlayArea[roundNumber]
			local doors = groupFolder.DoorsFloors:GetChildren()
			
			local correctDoorNumber = math.random(1,#doors)
			local correctDoor = doors[correctDoorNumber]
			local correctFloor = correctDoor.Floor
			table.remove(doors,correctDoorNumber)
			
			
			local tempFalseSongs = {}
			table.move(cloneSongs,1,#cloneSongs,1,tempFalseSongs)
			
			local falseFloors = {}
			
			for i, v in doors do
				local falseDoor = doors[i]
				local falseSongNumber = math.random(1,#tempFalseSongs)
				local falseSong = tempFalseSongs[falseSongNumber]
				local falseSongName = falseSong.SongName
				local falseImageID = falseSong.ImageID
				falseDoor.SurfaceGui.SongName.Text = falseSongName
				falseDoor.SurfaceGui.ImageLabel.Image = falseImageID
				table.remove(tempFalseSongs,falseSongNumber)
				table.insert(falseFloors,falseDoor.Floor)
			end
			
			
			correctDoor.SurfaceGui.SongName.Text = correctSongName
			correctDoor.SurfaceGui.ImageLabel.Image = correctSongImage
			local playingSong = Instance.new("Sound")
			playingSong.SoundId = correctSongID
			playingSong.Parent = game.SoundService


			repeat
				task.wait()
			until playingSong.IsLoaded == true
			
			-- print(correctSongName,"has loaded and the lenght is ",playingSong.TimeLength)
			
			local playingSongLength = playingSong.TimeLength
			local songStart = 0
			
			if randomSongTimes then
				local number = math.random(0,(playingSongLength - correctPossibeLength))
				songStart = number
			else
				songStart = 0
			end
			playingSong.TimePosition = songStart
			playingSong:Play()
			
			status.Value = "Listen Closely to the Song playing. It will only play for "..correctPossibeLength.." seconds."
			
			task.wait(correctPossibeLength)
			--print("Song Finished playing")
			playingSong:Remove()

tldr (if u lazy asf):
im trying to make it so that 2 audios that are each like 6 seconds long play after the 1st one so that it looks like its 1 audio

edit: any help is greatly appreciated :+1:

1 Like

iirc, Roblox should let you upload songs >6s if they’re private - try uploading them yourself if you haven’t already

Actually? for me, every time i try uploading something longer then 6 seconds, it gets moderated:

still available if someone is down to help :+1:

i’m not very sure, but this might be because the song you’re trying to upload is copyrighted and it only detects it after 6 seconds

nono, i was wondering if anyone could help me fix my script to however i asked. Ya think u could help perchance?

where ever you play the song, you can wait the song’s TimeLength and then play the second song? something like this (i didn’t actually test it though)

local song = Instance.New("Sound", game.Workspace)
local song2 = Instance.New("Sound", game.Workspace)
song.SoundId = --put the song's ID here
song2.SoundId = --put the second song's ID here
song:Play()
wait(song.TimeLength)
song2:Play()
1 Like

wouldnt it be better to use

song.Ended:Connect(function()

?

1 Like

i… actually did not know of that, it probably would be

so you’re basically asking us to help you bypass copyright law

1 Like

I mean, these games do it :person_shrugging:

As long as you credit the song music and the artists on it i’ll show you how to get songs… (use it for the good)

Actually? I mean, i dont mind creditting the songs music and artists

1 Like

I’m pretty sure you can… May need to pay a storage fee.
As far as making the song longer, can do what Tatanic_GamingYTalt posted and set the starting point.
That’s enough to make it as long as you wish. (maybe even slow it down)