Hi, So im trying to make a script where you can put an animation bundle in and it automatically applies it for you, i want to use the humanoid description for this but have found no way to do so, does anyone have a recommendation?
here’s my current code:
local Character = Player.Character or Player.CharacterAdded:Wait()
HipHeight = Player.Character:FindFirstChildOfClass("Humanoid").HipHeight
game.ReplicatedStorage.rbp:FireClient(Player)
if not Player:HasAppearanceLoaded() then Player.CharacterAppearanceLoaded:Wait() end
local Humanoid = Character:FindFirstChildOfClass("Humanoid")
if not Humanoid then return end
local HumanoidDescription = Humanoid:GetAppliedDescription()
local Success, Result = pcall(AssetService.GetBundleDetailsAsync, AssetService, id)
if not Success then warn(Result) return end
local acc = {}
HumanoidDescription.RunAnimation = id
HumanoidDescription.JumpAnimation = id
HumanoidDescription.FallAnimation = id
HumanoidDescription.IdleAnimation = id
HumanoidDescription.SwimAnimation = id
HumanoidDescription.ClimbAnimation = id
HumanoidDescription.WalkAnimation = id
for _, Item in ipairs(Result.Items) do
Success, Result = pcall(MarketplaceService.GetProductInfo, MarketplaceService, Item.Id)
if not Success then warn(Result) continue end
game.ReplicatedStorage.addItem:FireClient(Player,Item)
end
HumanoidDescription:SetAccessories(acc,false)
Humanoid:ApplyDescription(HumanoidDescription)
Player.Character:FindFirstChildOfClass("Humanoid").HipHeight = HipHeight