Hello everyone, I have looked at pretty much every tutorial on how to make a hat equip system, but none of them work for me.
I have an accessory, a meshpart inside called handle and inside a hairattachment. However, whenever I do humanoid:AddAttachment(hat), the hat is in the void, 500 miles below the baseplate although successfully being parented to the humanoid. CanCollide is turned off and anchored is also turned off. The hat is cloned from RS.
Literally just parent the hat to the character model. Clone it from replicated storage and parent it to the char.
I did that but for somereason its not on the player’s head. It’s 500 metres below baseplate
is it anchored? Does it work normally if you parent it in studio to a rig?
No its not anchored, it works when I put it in starterplayercharacter
what do you mean staerplayercharacter?
Just do hat,Parent = player.Character
Sorry startercharacterscripts
I did this but it didn’t work
local hat = game:GetService("ReplicatedStorage").Helmet
local handle = hat.Handle
local att = handle.HairAttachment
local plr = game:GetService("Players").LocalPlayer
plr.CharacterAdded:Connect(function(char)
hat.Parent = char
end)
what do you mean it works when you put it in starterhcharacterscripts? You might to do
local hat = game:GetService("ReplicatedStorage").Helmet
local handle = hat.Handle
local att = handle.HairAttachment
local plr = game:GetService("Players").LocalPlayer
plr.CharacterAdded:Connect(function(char)
plr.CharacterAppearanceLoaded:Wait()
hat.Parent = char
end)
when i put the accessory in there it works and is equipped to player
Ok I tried that now but didn’t work
What do you mean? Is there an error? Try having the script parent the hat to startercharacterscripts then.
I can’t parent it to startercharacterscripts as I want the hat to be equipped not just at start of game but later as well. There is nothing printed when I run it
so you’re running this code in starterplayerscripts correct?
local hat = game:GetService("ReplicatedStorage").Helmet
local handle = hat.Handle
local att = handle.HairAttachment
local plr = game:GetService("Players").LocalPlayer
plr.CharacterAdded:Connect(function(char)
plr.CharacterAppearanceLoaded:Wait()
hat.Parent = char
end)
yep
charlimitcharlimitcharlimit
Is it because its not anchored or something?
the helment isn’t being parented to the character?
Yes
sorry charlimitcharlimitcharlimit
actually not in this new script