|
| 15 Dec 2014 09:28 PM |
In my game, it gives custom hats for certain powerups, but I want these to be undroppable. I tried making the hats reparent back to the player when dropped, but this glitches and wont work correctly if players spam drop hats very quickly while changing powerup, and this leads to some very strange glitches. I was wondering how to somehow unbind the "=" key from hat dropping to prevent players from doing this. Please help. |
|
|
| Report Abuse |
|
|
|
| 15 Dec 2014 09:44 PM |
I'd do it like this,
game.Players.PlayerAdded:connect(function(p) p.CharacterAdded:connect(function(steve) steve.DescendantRemoving:connect(function(item) if (item:IsA("Hat")) then item.Parent =steve end end) end) end)
Basically, whenever each player looses something in their directory, it checks if it was a hat, and if it was, it just puts the hat back in the model thus ROBLOX will set the position of the hat back automatically.
at least I think...
lol |
|
|
| Report Abuse |
|
|
|
| 15 Dec 2014 09:51 PM |
But the thing is, this hat has more than 1 handle, there held together with a weld. When it reparents, all the other handles go missing. |
|
|
| Report Abuse |
|
|
|
| 15 Dec 2014 09:52 PM |
| I fixed this by having it detect if the hat is gone, and then (nearly, it crashes if I dont add a wait() to the loop) instantly putting a new one on them. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
Casualist
|
  |
| Joined: 26 Jun 2014 |
| Total Posts: 4443 |
|
|
| 15 Dec 2014 11:06 PM |
| Instead of using hats, weld the parts in the hats directly to the player. |
|
|
| Report Abuse |
|
|
|
| 15 Dec 2014 11:21 PM |
| My hat system is too deeply written into the game for that to work... |
|
|
| Report Abuse |
|
|
|
| 15 Dec 2014 11:51 PM |
| its probably inside the hat in the workspace. Like if'=keypressed'drop"Hat" just delete whatever looks like that. |
|
|
| Report Abuse |
|
|
|
| 16 Dec 2014 02:38 AM |
| I'm guessing to just unbind the = key. |
|
|
| Report Abuse |
|
|
AlgyLacey
|
  |
| Joined: 14 Jun 2013 |
| Total Posts: 3736 |
|
|
| 16 Dec 2014 05:03 AM |
Hats have a property for dropping, make it false.
-[ Where there is a will there's a way, and I WILL go THAT way. /\ ]- |
|
|
| Report Abuse |
|
|
|
| 16 Dec 2014 03:02 PM |
How do I unbind the "=" key? I checked the hat properties, there is no setting to make it undroppable. |
|
|
| Report Abuse |
|
|
|
| 16 Dec 2014 07:44 PM |
| There is probably a script in the hat that makes it droppable. Delete and save. |
|
|
| Report Abuse |
|
|
|
| 16 Dec 2014 09:24 PM |
| There isnt, hat dropping is built in. |
|
|
| Report Abuse |
|
|
| |
|