How do I change a players “bundle” when they join the game

Hello, So I wanted to create a script that changed the players bundle to a bundle id I select but couldn’t find how to do this, Im kinda lost can somebody help?

Well I managed to write this with the help of gpt but it doesnt really work can anyone help

local Players = game:GetService("Players")

local BUNDLE_ID = 4316473242969

Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		local humanoid = character:WaitForChild("Humanoid")

		local success, description = pcall(function()
			return Players:GetHumanoidDescriptionFromBundleId(BUNDLE_ID)
		end)

		if success and description then
			description.BackAccessory = ""
			description.FaceAccessory = ""
			description.FrontAccessory = ""
			description.HairAccessory = ""
			description.HatAccessory = ""
			description.NeckAccessory = ""
			description.ShouldersAccessory = ""
			description.WaistAccessory = ""

			humanoid:ApplyDescription(description)
		else
			warn("Sum went wrong vro")
		end
	end)
end)

This is a script I use in most of my games that sets players to outfits that fit the game.

--ServerScript in ServerScriptService
game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character) task.wait(1)
		local dfp,dfs=character:WaitForChild("Pants"),character:WaitForChild("Shirt")
		dfp.PantsTemplate="rbxassetid://?????";dfp.Color3=Color3.fromRGB(176,208,255)
		dfs.ShirtTemplate="rbxassetid://?????";dfs.Color3=Color3.fromRGB(176,208,255)
		for _,a in pairs(character:GetChildren())do
			if a:IsA("Accessory")then
				if a.AccessoryType ~=Enum.AccessoryType.Hair and
					a.AccessoryType~=Enum.AccessoryType.Eyelash and
					a.AccessoryType~=Enum.AccessoryType.Eyebrow then
					a:Destroy()
				end
			end
		end
	end)
end)

This may be more of a first step for you .. then add in the Bundle Accessories

but doesn’t this just… change the outfit of the player, I want it so that the entire bundle changes

The Bundles are a bunch of Accessories.. That script only allows the hair and a few face items. If they even have them .. like the animated faces. And it is setting up a new Shirt and Pants, with a janky way to tint them.

Alright thanks, I found a way to implement bundles into my game without using a script but your script will help with removing the unnecesarry items that players have.

Good deal and that is totally what that script is for.. and it adds a shirt and pants as that is all I need it to do.