Serkisx
|
  |
| Joined: 25 May 2014 |
| Total Posts: 4270 |
|
|
| 13 Feb 2016 08:09 AM |
How do you make a player have a custom hat on their head?
How do I do it? Please help me... I know how to do it with pants and shirt.
Google is a magical place my friend. |
|
|
| Report Abuse |
|
|
Smeers
|
  |
| Joined: 14 Feb 2013 |
| Total Posts: 797 |
|
|
| 13 Feb 2016 08:13 AM |
'Custom' hat?
As in you want a hat that you created on their head?
You would insert the Hat object (should have a Handle in it, that has a Mesh in it, which would be the hat) into the character. It wouldn't work if it was just lying around unanchored in the workspace. |
|
|
| Report Abuse |
|
|
Serkisx
|
  |
| Joined: 25 May 2014 |
| Total Posts: 4270 |
|
|
| 13 Feb 2016 09:04 AM |
I'm talking about a player, not a NPC/Dummy.
Google is a magical place my friend. |
|
|
| Report Abuse |
|
|
|
| 13 Feb 2016 09:08 AM |
| Smeers is right. If you name a part "Handle" and put it inside of a Hat object then it can be worn by the player. To force them to wear it you just directly parent it to the Character, it will work no matter how many hats they have on. |
|
|
| Report Abuse |
|
|
Serkisx
|
  |
| Joined: 25 May 2014 |
| Total Posts: 4270 |
|
|
| 13 Feb 2016 09:12 AM |
@wonderful
Do I need a script for that?
Google is a magical place my friend. |
|
|
| Report Abuse |
|
|
|
| 13 Feb 2016 09:13 AM |
Yeah you need a script. example this
game.Workspace.MYHATyoudontknowlolel:clone().Parent = game.Players.LocalPlayer.Character |
|
|
| Report Abuse |
|
|
Serkisx
|
  |
| Joined: 25 May 2014 |
| Total Posts: 4270 |
|
|
| 13 Feb 2016 09:27 AM |
I got it work, but now if I reset, I don't have it on anymore.
Google is a magical place my friend. |
|
|
| Report Abuse |
|
|
|
| 13 Feb 2016 09:34 AM |
| So you have to add it every time they spawn. Since it is a custom hat it can't be auto-loaded from the website. |
|
|
| Report Abuse |
|
|
Csharp0
|
  |
| Joined: 05 Mar 2015 |
| Total Posts: 261 |
|
|
| 13 Feb 2016 09:40 AM |
| Your siggy is very ironic, Serk. lmao |
|
|
| Report Abuse |
|
|
Serkisx
|
  |
| Joined: 25 May 2014 |
| Total Posts: 4270 |
|
|
| 13 Feb 2016 09:42 AM |
Is there no other way to do it?
Google is a magical place my friend. |
|
|
| Report Abuse |
|
|
Serkisx
|
  |
| Joined: 25 May 2014 |
| Total Posts: 4270 |
|
|
| 13 Feb 2016 09:43 AM |
@Csharp,
I just noticed, LOOL.
Google is a magical place my friend. |
|
|
| Report Abuse |
|
|
indeimaus
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 4285 |
|
|
| 13 Feb 2016 09:56 AM |
hat = where your hat is located
game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) local hatClone = hat:Clone() hatClone.Parent = character end) end) |
|
|
| Report Abuse |
|
|
indeimaus
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 4285 |
|
|
| 13 Feb 2016 10:02 AM |
and the hat can't be anchored or in serverstorage unless you clone it into the player's client(straight from serverstorage wont work)
this will work if the hat is in serverstorage and named "Hat"
game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) local realHat = game:GetService("ServerStorage").Hat:Clone() realHat.Parent = game.ReplicatedStorage local playerHat = realHat:Clone() playerHat.Parent = character realHat:Destroy() end) end) |
|
|
| Report Abuse |
|
|
Serkisx
|
  |
| Joined: 25 May 2014 |
| Total Posts: 4270 |
|
|
| 13 Feb 2016 10:05 AM |
@indei, what do you mean where my hat is
Google is a magical place my friend. |
|
|
| Report Abuse |
|
|
indeimaus
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 4285 |
|
|
| 13 Feb 2016 10:10 AM |
| I mean where ever you put that hat like if your hat is in the workspace then you type workspace:FindFirstChild("insert the hat's name here") |
|
|
| Report Abuse |
|
|
|
| 13 Feb 2016 10:17 AM |
| if you are gonna try to script you might as well learn the basics of studio first :P |
|
|
| Report Abuse |
|
|
Serkisx
|
  |
| Joined: 25 May 2014 |
| Total Posts: 4270 |
|
|
| 13 Feb 2016 10:19 AM |
cant make it work ffs
Google is a magical place my friend. |
|
|
| Report Abuse |
|
|
indeimaus
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 4285 |
|
|
| 13 Feb 2016 10:24 AM |
gosh darn it ,you goof!
just use the first one I sent but replace "hat = where the hat is" with "hat = game.ReplicatedStorage.Hat" and make sure the hat's value "Name" is "Hat" |
|
|
| Report Abuse |
|
|
indeimaus
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 4285 |
|
|
| 13 Feb 2016 10:25 AM |
| AND DON'T FORGET TO PUT THE HAT IN REPLICATED STORAGE |
|
|
| Report Abuse |
|
|
|
| 13 Feb 2016 10:33 AM |
put this script into screengui
game.Workspace.MYHATyoudontknowlolel:clone().Parent = game.Players.LocalPlayer.Character |
|
|
| Report Abuse |
|
|
Serkisx
|
  |
| Joined: 25 May 2014 |
| Total Posts: 4270 |
|
|
| 13 Feb 2016 10:42 AM |
Nothing is working, fml.
Google is a magical place my friend. |
|
|
| Report Abuse |
|
|
Serkisx
|
  |
| Joined: 25 May 2014 |
| Total Posts: 4270 |
|
|
| 13 Feb 2016 10:49 AM |
What's wrong in this script?
hat = game.ReplicatedStorage.Hat
game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) local realHat = game:GetService("ServerStorage").Hat:Clone() realHat.Parent = game.ReplicatedStorage local playerHat = realHat:Clone() playerHat.Parent = character realHat:Destroy() end) end)
Google is a magical place my friend. |
|
|
| Report Abuse |
|
|
indeimaus
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 4285 |
|
|
| 13 Feb 2016 10:56 AM |
THIS ONE IS ONLY USED IF "Hat" IS IN SERVERSTORAGE At this point I'm not even sure you're a human. How do we know you're not an alien?!!!! |
|
|
| Report Abuse |
|
|
Serkisx
|
  |
| Joined: 25 May 2014 |
| Total Posts: 4270 |
|
|
| 13 Feb 2016 10:57 AM |
It is though. x'D
Google is a magical place my friend. |
|
|
| Report Abuse |
|
|
indeimaus
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 4285 |
|
|
| 13 Feb 2016 11:07 AM |
the script you're trying to use doesn't clone anything called "Hat" in replicated storage. that script copies a hat from severstorage to replicated storage then the player and after all of that deletes the hat it cloned in replicated storage |
|
|
| Report Abuse |
|
|