I'm having an issue with my chenge suit system

I’m currently working on a suit changing system. When I would press shift, the suit would change.

The local script fires a remote properly but the server code does not work, because of an error, it seems.
Error: " Humanoid::ApplyDescription() Failed to load Pants, default applied - Studio"
It happens with both the pants and shirt.

I have looked over the devforum but haven’t found much upon this. Or maybe I didn’t search properly.

Code:

game.ReplicatedStorage.Remotes.SuitChange.OnServerEvent:Connect(function(player)
	local humanoid = player.Character.Humanoid
	local classic = script.Classic
	local symbiote = script.Symbiote
	local classicmask = humanoid.Parent.ClassicMask
	local symbiotemask = humanoid.Parent.SymbioteMask
	local bool = game.ReplicatedStorage.Bools.Suit
	if bool == true then
		humanoid:ApplyDescription(symbiote)
		classicmask.Transparency = 1
		symbiotemask.Transparency = 0
		bool = false
	else
		humanoid:ApplyDescription(classic)
		classicmask.Transparency = 0
		symbiotemask.Transparency = 1
		bool = true
	end
end)

The crash seems to happen at humanoid:ApplyDescription, most likely the first one. I have double checked the description ids and they are all good. I can’t tell what is wrong here, so if someone knows, please tell me!

My code isn’t too good, I know. I just started programming here a few months ago

Hey there! :wave:

I’ve provided a few ideas that may fix your issue:

  • Have you made sure that the clothing you are using has not been moderated?
  • Are you sure the clothing is an actual pants ID or is it an image?
  • Are you sure there are no errors in the ID?

Best of luck with resolving this issue! :grinning_face_with_smiling_eyes:

I’m fairly certain it hasn’t been moderated, since it can be found here: Spider-Man (Symbiote) - Roblox
and here:
Spider-Man (Symbiote) - Roblox

I’ve also copied the id’s from the link. Maybe I should have included this in the post, but in an older version of this which didn’t work to well, the descriptions were working perfectly fine. I’m starting to think it’s more of a glitch then my error, yet I have no idea so far.

That’s a Shirt, not pants? Is this the issue?

Edit: My bad, I realised you included the pants too.

Could you try inserting the pantsID of another pants clothing to test if the actual script works?

Same issue with new ones too. It says “-studio” so I’m guessing it wouldn’t be my script, but in what state it is now, you never know

Hm, that’s super weird. It may be your script as it’s unusual for Roblox Studio to glitch like that. Let me find a UniformGiver script that I have, one moment…

Here’s a script I’ve whipped up for you.

local Shirt = "rbxassetid://ASSETIDHERE" -- Put your own AssetID

local Pants = "rbxassetid://ASSETIDHERE" -- Put your own AssetID

function GiveUni (plr)
local character = plr.Character
local shirt = character.Shirt
local pants = character.Pants
shirt.ShirtTemplate = Shirt
pants.PantsTemplate = Pants
end

game.ReplicatedStorage.Remotes.SuitChange.OnServerEvent:Connect(GiveUni)

Try replacing your script with this. ^

1 Like

I have used descriptions since, for some reason, last time I tried with id’s clothes didn’t change. The id did, but the clothes just disappeared as if I would use something invalid. I am pretty sure you don’t need to own them, yet each time I have used this method, clothes and pants disappeared, including now.

Weird. Id’s are once again correct, so I don’t know what wouldn’t be working. I might just do it locally since it’s single player and see if it would work that way

Hm, that’s quite unusual.

Yes, I suggest trying it in a LocalScript. Go ahead!

1 Like

That only means the clothing was moderated or something. It isn’t an error, but you did say it was s crash…?

Anyways, you must wanna change the clothing. It’s very likely moderated. It’s just a warning in the console though.

1 Like

I’m pretty sure you can’t call :ApplyDescription() from a client if the character is accessable by other people. (Server-owned, server-created)

1 Like

Erorr, sorry english is not my first language and I tend to get some words messed up. I have tried changing the clothing a few times, same thing

Well I tried changing the id locally yet no difference, clothes won’t load

I’ve managed to solve it. Instead of equipping a humanoid description I’m cycling between suits.

Thanks to everyone who tried to help me! :slight_smile:

1 Like