DutLer22
|
  |
| Joined: 29 May 2016 |
| Total Posts: 84 |
|
|
| 19 Jan 2017 05:01 AM |
| i have a hat remover script and it works but it only works for the hats u have on ur character. and i have some models with the hat giver script. and the hat remover script won't work on those models with hat giver script so i am stuck with a hat remover that only takes off the hats that u already are wearing plz help |
|
|
| Report Abuse |
|
|
|
| 19 Jan 2017 05:16 AM |
Those hats are probably just welded meshes.
Remover.Touched:connect(function(Part) local Plyr = game.Players:GetPlayerFromCharacter(Part.Parent) if Plyr then for i,v in next, Plyr.Head:GetChildren()do if v:IsA("JointInstance")then v.Part0:Destroy() v:Destroy() end end end end) |
|
|
| Report Abuse |
|
|
| |
|
DutLer22
|
  |
| Joined: 29 May 2016 |
| Total Posts: 84 |
|
| |
|
DutLer22
|
  |
| Joined: 29 May 2016 |
| Total Posts: 84 |
|
|
| 19 Jan 2017 05:32 AM |
| where do i put that script? |
|
|
| Report Abuse |
|
|
|
| 19 Jan 2017 05:35 AM |
Into the part which you step on if you want to remove the hats. Just add
Remover = script.Parent at the beginning. But you should combine it with a real hat remover. |
|
|
| Report Abuse |
|
|
DutLer22
|
  |
| Joined: 29 May 2016 |
| Total Posts: 84 |
|
|
| 19 Jan 2017 05:37 AM |
this is the script i have right now for the hat remover. is it real?
Remover = script.Parent function onTouched(hit) local d = hit.Parent:GetChildren() for i=1, #d do if (d[i].className == "Accessory") then d[i]:remove() end end end script.Parent.Touched:connect(onTouched)
|
|
|
| Report Abuse |
|
|
DutLer22
|
  |
| Joined: 29 May 2016 |
| Total Posts: 84 |
|
|
| 19 Jan 2017 05:40 AM |
| oh wait thanks for help! i just found out that the hats were 'hat' instead of 'accessory' |
|
|
| Report Abuse |
|
|