Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Custom hat don't attach to the player?

I made a custom hat and I'm trying to attach to the player with HumanoidDescription. The helmet spawn near the player, instead of being in the head.

This is my code:

--[Variables]--
local changeHumanoid = Instance.new("HumanoidDescription")


game.Players.CharacterAutoLoads = false

game.Players.PlayerAdded:Connect(function(player)
	changeHumanoid.BodyTypeScale = 1
	changeHumanoid.HeightScale = 1.5
	changeHumanoid.WidthScale = 1.5
	changeHumanoid.ProportionScale = 1.5
	changeHumanoid.DepthScale = 1.5
	changeHumanoid.HeadScale = 1.5
	changeHumanoid.HeadColor = Color3.fromRGB(36, 56, 71)
	changeHumanoid.TorsoColor = Color3.fromRGB(36, 56, 71)
	changeHumanoid.LeftArmColor = Color3.fromRGB(36, 56, 71)
	changeHumanoid.LeftLegColor = Color3.fromRGB(36, 56, 71)
	changeHumanoid.RightArmColor = Color3.fromRGB(36, 56, 71)
	changeHumanoid.RightLegColor = Color3.fromRGB(36, 56, 71)
	changeHumanoid.Face = 398676450
	changeHumanoid.HatAccessory = "3984854088"
	player:LoadCharacterWithHumanoidDescription(changeHumanoid)
end)

Note: I created the hat using Maya and I uploaded it as mesh for get the ID

1 answer

I don't really know if you need it to be in the HumanoidDescription . But, you're in luck: Make a new Accessory, with a part named Handle in the Accessory. Make the accessory in StarterPack Add a SpecialMesh into the Handle then customize it. Add an attachment named HairAttachment into the handle. (maybe:) Add a NumberValue named OriginalSize.

This discussion is preserved as it was. New answers, comments, and votes are closed.