Hi there! So i’ve been experiencing this bug recently, as you can see in the video:
What should i do to repair this?
Feel free to share you thoughts anytime!
Hi there! So i’ve been experiencing this bug recently, as you can see in the video:
What should i do to repair this?
Feel free to share you thoughts anytime!
Can you show me the script that you use to morph?
You want me to paste all the code or
Just the code that you use to morph the player.
local function applyMorph(character: Model, humanoidDescription: HumanoidDescription)
local charHumanoid = character:WaitForChild("Humanoid");
charHumanoid:ApplyDescription(humanoidDescription, Enum.AssetTypeVerification.Always)
end
Can you also supply the part of the script that has the values for the clothing that the player morphs into?
it doesn’t use any values, it just uses humanoid description
Are you getting any errors in the output?
no it doesn’t have any errors in the output
I would recommend checking the clothing Id’s in the Humanoid Descriptions that aren’t working, to make sure that they are there and/or are valid Id’s.
Yeah, i think ima try that, because that’s what in my mind earlier, but how would i check if its a valid id or not?
Here is a simple script that allows you to check whether the Id is valid or not:
local function isClothingValid(assetId)
local success, assetInfo = pcall(function()
return game:GetService("AssetService"):GetAssetInfo(assetId)
end)
if success then
return assetInfo.AssetTypeId == 8 -- AssetTypeId 8 represents clothing
else
return false -- If there's an error, consider the asset ID invalid
end
end
local clothingId = 123456789 -- Replace with the clothing ID you want to check
if isClothingValid(clothingId) then
print("Clothing with ID", clothingId, "is valid.")
else
print("Clothing with ID", clothingId, "is not valid or does not exist.")
end
Thank you so much i will try it! I will be right back, i will check this as the solution if it works
Btw additional question, how would i resolve it once it gets an error?
There are two ways that could potentially solve the issue if you get an error:
Check if the Clothing Id that got the error is the correct Id, and if not, then change it.
Use a different Clothing Id to see if it works instead.
Also btw, :GetAssetInfo()
is not a valid method in AssetService
Whoops, I put the wrong thing. Here is the corrected script:
local function isClothingValid(assetId)
local success, packageIds = pcall(function()
return game:GetService("AssetService"):GetAssetIdsForPackage(assetId)
end)
if success then
-- Check if the package contains clothing items (AssetTypeId 41 represents clothing)
for _, packageId in pairs(packageIds) do
local packageInfo = game:GetService("AssetService"):GetAssetInfo(packageId)
if packageInfo.AssetTypeId == 41 then
return true
end
end
return false
else
return false -- If there's an error, consider the asset ID invalid
end
end
local clothingId = 123456789 -- Replace with the clothing ID you want to check
if isClothingValid(clothingId) then
print("Clothing with ID", clothingId, "is valid.")
else
print("Clothing with ID", clothingId, "is not valid or does not exist.")
end
i’ve already told you that :GetAssetInfo
is not a valid method,
are you using an ai?
I have tried using different variations of this code, and all of them are saying that Id’s aren’t valid, so I’m not sure how you would solve your problem this way. I would just manually check that none of the Id’s are missing and/or that they are valid by recopying the Id’s and reinserting them into their respective places.
You could apply humanoid description…