[Roblox Studio]SoundIdでSoundオブジェクトを探す方法例

Roblox StudioでSoundオブジェクトを検索したい場合

以下をRoblox Studioのコマンドバーで入力するとoutputタブに出力される
if sound.SoundId == "rbxassetid://137473066" then の部分は任意のsoundIdに変更する

for _, service in ipairs(game:GetChildren()) do
	local success, result = pcall(function()
		return service:GetDescendants()
	end)
	
	if success then
		if result then
			for _, sound in ipairs(result) do
				if sound:IsA("Sound") then
					if sound.SoundId == "rbxassetid://137473066" then
						print(sound.Name)
						print(sound.parent)
					end
				end
			end
		end
	end
end

参考

https://devforum.roblox.com/t/tried-to-delete-a-sound-that-failed-to-load-but-im-unable-to-find-it/1717677/4

コメントを残す

メールアドレスが公開されることはありません。