Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Custom hat don't attach to the player?

Asked by 5 years ago

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

Log in to vote
0
Answered by 5 years ago

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.

Ad

Answer this question