of     1   

Krypticon
#140028992Friday, July 11, 2014 10:31 PM GMT

Basically I just want to know how to make it so that the player can't throw their hat's of. Thanks :)
blockoo
#140029630Friday, July 11, 2014 10:37 PM GMT

You can't "disable" it, but you can make a script that puts the hat right back on the player's head the instant that they drop it.
blockoo
#140033728Friday, July 11, 2014 11:19 PM GMT

I actually just made this out of boredom. Here you go: http://www.roblox.com/Anti-Hat-Drop-Script-item?id=165886989
MHebes
#140034653Friday, July 11, 2014 11:28 PM GMT

Aw you ninja'd me. Here's my take, anyways (LocalScript in StarterGui) local player = game.Players.LocalPlayer repeat wait() until player.Character local character = player.Character local hats = {} for _, hat in pairs(character:GetChildren()) do if hat:IsA("Hat") then table.insert(hats, hat) end end character.ChildAdded:connect(function(hat) if hat:IsA("Hat") then table.insert(hats, hat) end end) game:GetService("RunService").RenderStepped:connect(function() for _, hat in pairs(hats) do if hat.Parent ~= character then hat.Parent = character end end end)
MHebes
#140034722Friday, July 11, 2014 11:29 PM GMT

(I lied you didn't ninja me I just wanted to do it)
blockoo
#140036487Friday, July 11, 2014 11:48 PM GMT

Th original one I published had a bug, which I fixed in the newest version. @MHebes Wow, I didn't even thing about using a LocalScript in StarterGui :P Still, mine works upon being inserted into Workspace and runs off of only a single script for all players.
MHebes
#140036872Friday, July 11, 2014 11:52 PM GMT

It also creates a new thread for each player :P Also, I suggest using RunService.RenderStepped instead of a while loop - it runs at 60 FPS instead of 30, meaning you don't see the hat flicker off.
blockoo
#140038044Saturday, July 12, 2014 12:06 AM GMT

Thanks for the suggestion. I also just found a major problem with my script, and I assume it is for yours as well. Every time the function plays through, it adds the same hat to the table over and over and the game gets extremely laggy very quickly.
blockoo
#140038963Saturday, July 12, 2014 12:17 AM GMT

Ok, final version for sure this time. I have fully updated and fixed the script in the link I posted above.
Krypticon
#140092299Saturday, July 12, 2014 2:55 PM GMT

Thanks guys :D
Brick_man
#140093886Saturday, July 12, 2014 3:18 PM GMT

I know the problem is solved now, but I thought there was a way to disable keys. I think the method was :UnbindKey or something like that.
Krypticon
#140197625Sunday, July 13, 2014 3:09 PM GMT

Cool, good to know thanks :)
CodyTheBuildingKid
#140198092Sunday, July 13, 2014 3:17 PM GMT

Or if you don't want to use while loops or run service: Game.Players.PlayerAdded:connect(function(P) P.CharacterAdded:connect(function(C) C.DescendantRemoving:connect(function(D) if D:IsA("Hat") then D.Parent = C end end) end) end)

    of     1