How can I give asset permission to many assets at once?

I have recently switched groups and wanted to port my game from my other group to my new one. (I own both groups and am owner) I thought this would be easy, but then I ran into a roadblock with Audios. My game has over 100 audio assets, however since I have to manually set each one’s permissions to let my new group access them, they all don’t load.

My New Game:
image

My Old Game:
image

I am just asking if there is a quicker way than going through all 123 sounds and adding them manually.

I thought about it for a second and ended up writing this script that worked perfectly. Make sure you have access to all the sounds in your game or else it will just error out when entering. (I had this issue)

local ReplicatedStorage = game:GetService("ReplicatedStorage")

local CSharpExtensions = require(ReplicatedStorage.Lotus.Extensions.CSharpExtensions)

local AudioAssets: {Sound} = CSharpExtensions.Where(game:GetDescendants(), function(i: Instance)
	return i:IsA("Sound")
end)

local response = ""

for _, sound in pairs(AudioAssets) do
	response = response..string.gsub(sound.SoundId, "rbxassetid://", "")..","
end

-- CSharpExtensions Script

function CSharpExtensions.Where(listToSearch: {any}, func: any): {any}
	local returnedTable = {}
	
	for i, value in pairs(listToSearch) do
		local flag = func(value, i)
		if flag then
			returnedTable[i] = value
		end
	end
	
	return returnedTable
end

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.