What I want is to make all players in my game wear a predetermined outfit for the entire game.
What I did was “Players.CharacterAutoLoads = false” and create a HumanoidDescription with all the assets I want the player to have.
The problem is that I don’t know how to assign that HumanoidDescription to the player all the time. From when he joins the game, to when he dies or resets.
This code I found in this tutorial is only useful for when the player joins but not when he/she resets.
-- Stop automatic spawning so it can be done in the "PlayerAdded" callback
game.Players.CharacterAutoLoads = false
local function onPlayerAdded(player)
-- Create a HumanoidDescription
local humanoidDescription = Instance.new("HumanoidDescription")
humanoidDescription.HatAccessory = "2551510151,2535600138"
humanoidDescription.BodyTypeScale = 0.1
humanoidDescription.ClimbAnimation = 619521311
humanoidDescription.Face = 86487700
humanoidDescription.GraphicTShirt = 1711661
humanoidDescription.HeadColor = Color3.new(0, 1, 0)
-- Spawn character with the HumanoidDescription
player:LoadCharacterWithHumanoidDescription(humanoidDescription)
end
-- Connect "PlayerAdded" event to "onPlayerAdded()" function
game.Players.PlayerAdded:Connect(onPlayerAdded)
I don’t want to create StarterCharacter because I want the clothes a player wears to change dynamically and the only way to achieve that is with a HumanoidDescription.
Thank you for helping me.