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

How to add hats to players/NPCs?

I have a script that clones a hat and inserts it into a player, when I do this the hat falls through the player and through the baseplate. Even if I MakeJoints. Thanks.

local hat = workspace.Hat:Clone()
hat.Parent = workspace.Player

I have multiple hats I want to clone btw. This is also in a game with FilteringEnabled.

5 comments

0

Not sure, but is the hat CanCollide set to true?

0

Parenting the hats to an entity should be able to work.

0

@Michael007800 That shouldn't even matter. All ignorant thoughts and assumptions aside, though, I'll test this out.

0

All the hats were in ServerStorage, though.

1 answer

I'm a Newbie at scripting, but I know what you're talking about and it happened to me before. So this is my method of putting hats on an NPC without using a script.

Just get a free model of that hat. In the Explorer, just copy the Part with a mesh and paste it in the Workspace. Then, use the axis tool to drag it in the NPC, and make sure you anchor it.

I hope this helps...even if I'm a Newbie.

1 comment

0

Well, this NPC needs to Walk. It follows the player's movements, so when the NPC tries to walk it falls off.

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