generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: How can I disable the "=" key hat dropping?

Previous Thread :: Next Thread 
cybercircut is not online. cybercircut
Joined: 28 Jan 2011
Total Posts: 280
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
DigitalVeer is not online. DigitalVeer
Joined: 23 Jun 2009
Total Posts: 4182
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
cybercircut is not online. cybercircut
Joined: 28 Jan 2011
Total Posts: 280
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
cybercircut is not online. cybercircut
Joined: 28 Jan 2011
Total Posts: 280
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
cybercircut is not online. cybercircut
Joined: 28 Jan 2011
Total Posts: 280
15 Dec 2014 10:09 PM
bump
Report Abuse
cybercircut is not online. cybercircut
Joined: 28 Jan 2011
Total Posts: 280
15 Dec 2014 10:24 PM
bump
Report Abuse
Casualist is not online. 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
cybercircut is not online. cybercircut
Joined: 28 Jan 2011
Total Posts: 280
15 Dec 2014 11:21 PM
My hat system is too deeply written into the game for that to work...
Report Abuse
LittleFruitCake is not online. LittleFruitCake
Joined: 17 May 2013
Total Posts: 802
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
DispenseTheDispenser is not online. DispenseTheDispenser
Joined: 20 Jun 2013
Total Posts: 2268
16 Dec 2014 02:38 AM
I'm guessing to just unbind the = key.
Report Abuse
AlgyLacey is not online. 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
cybercircut is not online. cybercircut
Joined: 28 Jan 2011
Total Posts: 280
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
LittleFruitCake is not online. LittleFruitCake
Joined: 17 May 2013
Total Posts: 802
16 Dec 2014 07:44 PM
There is probably a script in the hat that makes it droppable. Delete and save.
Report Abuse
cybercircut is not online. cybercircut
Joined: 28 Jan 2011
Total Posts: 280
16 Dec 2014 09:24 PM
There isnt, hat dropping is built in.
Report Abuse
LittleFruitCake is not online. LittleFruitCake
Joined: 17 May 2013
Total Posts: 802
16 Dec 2014 09:27 PM
Ethel not
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image