J_acob
|
  |
| Joined: 26 Feb 2016 |
| Total Posts: 926 |
|
|
| 22 Jan 2017 11:19 PM |
I want to drop hats in my game.
|
|
|
| Report Abuse |
|
|
|
| 22 Jan 2017 11:20 PM |
local function dropHats() local localPlayer = game:GetService("Players").LocalPlayer if localPlayer and localPlayer.Character then for _, obj in pairs(localPlayer.Character:GetChildren()) do if obj:IsA("Accoutrement") then obj.Parent = game.Workspace end end end end
game:GetService("UserInputService").InputBegan:connect(function(inputObject, gameProcessedEvent) if not gameProcessedEvent then if inputObject.KeyCode == Enum.KeyCode.Equals then dropHats() end end end)
|
|
|
| Report Abuse |
|
|
J_acob
|
  |
| Joined: 26 Feb 2016 |
| Total Posts: 926 |
|
| |
|
|
| 22 Jan 2017 11:32 PM |
Put it in a localscript in StarterPlayerScripts.
|
|
|
| Report Abuse |
|
|