Is there a way to block / disable Automatic character loading appearance for specific player?

Hello!
My game has “skin-hiding” mechanic, which changes player avatar to random outfit after player’s character appears.

Allow me to explain the script works:

  • There’s a PlayerSkinsTable in script which caches each player’s their randomly generated skin.
  • Once player triggered an disguise event, the game picks random-looking outfit and caches it to PlayerSkinsTable.
  • As soon player’s character loads (if player has triggered “skin-hiding” before), the script firing :ApplyDescription() with generated skin as argument onto character using HumanoidDescription.

The issue is, after :ApplyDescription() being fired on player’s humanoid, the auto character appearance loading player’s regular avatar and the character model getting completely messed up like on picture below.

image
“An example of random outfit messed up with my avatar.”

The server-script work goes fine, especially my server-script are bigger and complicated than explained. I only want to disable character appearance loading for players, that has cached random-looking outfit. Thank you for understand.

-- This is an short example how my script works.

game.Players.PlayerAdded:Connect(function(Player)
	Player.CharacterAdded:Connect(function(character)
		local thumanoid = character:WaitForChild('Humanoid');
		task.spawn(function()
			if thumanoid then
				-- "session" isn't linked here, but in full version of script it stores player's data-stuff.
				-- 'hasDisguise' is value of player's "session", which contain (HumanoidDescription) of saved outfit for player;
				if session.hasDisguise ~= nil then
					pcall(function()
						thumanoid:ApplyDescription(session.hasDisguise);
					end);
				end;	
			end;			
		end);
	end);
end);

Hello again. I just found out that CanLoadCharacterAppearance variable exists. Do not need to reply, i already fixed the problem.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.