Zootopia
|
  |
| Joined: 29 Apr 2009 |
| Total Posts: 1383 |
|
|
| 02 Feb 2015 12:32 AM |
Is there a way to disable hat dropping?
I've made a game where the whole point is to wear a given hat, and the entire game does break if the player drops their hat. |
|
|
| Report Abuse |
|
|
Poseidas
|
  |
| Joined: 23 Nov 2008 |
| Total Posts: 2659 |
|
|
| 02 Feb 2015 12:34 AM |
| Upon the character being created, you should create a weld of your own. +/- won't destroy that weld. |
|
|
| Report Abuse |
|
|
Poseidas
|
  |
| Joined: 23 Nov 2008 |
| Total Posts: 2659 |
|
| |
|
Tuneable
|
  |
| Joined: 16 Feb 2013 |
| Total Posts: 2932 |
|
|
| 02 Feb 2015 12:39 AM |
Just move the handle out of the hat, delete the hat, and reweld.
Maybe something like
for i,v in pairs(Character:GetChildren()) do if v:IsA("Hat") then local HatHandle = v.Handle HatHandle.Parent = Character HatHandle:BreakJoints() local HatWeld = Instance.new("Weld", Character.Head) HatWeld.Part0 = Character.Head HatWeld.Part1 = HatHandle HatWeld.C0 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1) HatWeld.C1 = v.AttachmentPoint v:Destroy() end end |
|
|
| Report Abuse |
|
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 02 Feb 2015 12:41 AM |
OR
you could check if they drop the hat and replace it in them |
|
|
| Report Abuse |
|
|
|
| 02 Feb 2015 12:56 AM |
| Search prevent hat dropping in the wiki, theres a script there that welds all hats |
|
|
| Report Abuse |
|
|