ZeetZeet
|
  |
| Joined: 01 May 2012 |
| Total Posts: 179 |
|
|
| 13 Jun 2012 08:24 PM |
function growHum(key)
if key:lower() == "x" then game.Players.LocalPlayer.Character.Head:Remove() end end
|
|
|
| Report Abuse |
|
|
|
| 13 Jun 2012 08:25 PM |
Only if you actually call the function. And this is a localscript.
-[::ƧѡÎḾḠΰῩ::]-[::Maker of stuff and Helper of Scripting::]- |
|
|
| Report Abuse |
|
|
ZeetZeet
|
  |
| Joined: 01 May 2012 |
| Total Posts: 179 |
|
|
| 13 Jun 2012 08:26 PM |
| I have it written in a localscript, but could you be a little more specific? |
|
|
| Report Abuse |
|
|
|
| 13 Jun 2012 08:27 PM |
You never tell the function to run. It's just sitting there like soggy oatmeal. Nothing will happen.
Read this: http://wiki.roblox.com/index.php/KeyDown_(Event)
-[::ƧѡÎḾḠΰῩ::]-[::Maker of stuff and Helper of Scripting::]- |
|
|
| Report Abuse |
|
|
ZeetZeet
|
  |
| Joined: 01 May 2012 |
| Total Posts: 179 |
|
|
| 13 Jun 2012 08:32 PM |
local function onKeyDown(key) function growHum(key)
if key:lower() == "x" then game.Players.LocalPlayer.Character.Head:Remove() end end end
Thats what I got, I dont know what else to do, I'm going off of Telamon's Foe Hammer, and there is nothing I see to help me out. |
|
|
| Report Abuse |
|
|
ZeetZeet
|
  |
| Joined: 01 May 2012 |
| Total Posts: 179 |
|
|
| 13 Jun 2012 08:35 PM |
Forgot the connecting line
local function onKeyDown(x) function growHum(key)
if key:lower() == "x" then game.Players.LocalPlayer.Character.Head:Remove() end end end
mouse.KeyDown:connect(onKeyDown)
|
|
|
| Report Abuse |
|
|
|
| 13 Jun 2012 08:41 PM |
local hop = Instance.new("HopperBin", game.Players.LocalPlayer.Backpack) hop.Name = "Headrem"
hop.Selected:connect(function(mouse) mouse.KeyDown:connect(function(key) if key:lower() == "x" then game.Players.LocalPlayer.Character.Head:Destroy() end end) end) |
|
|
| Report Abuse |
|
|
ZeetZeet
|
  |
| Joined: 01 May 2012 |
| Total Posts: 179 |
|
|
| 13 Jun 2012 08:43 PM |
| I need this all integrated into one "Tool". |
|
|
| Report Abuse |
|
|
ZeetZeet
|
  |
| Joined: 01 May 2012 |
| Total Posts: 179 |
|
| |
|
|
| 13 Jun 2012 10:20 PM |
function growHum(key)
if key:lower() == "x" then game.Players.LocalPlayer.Character.Head:Remove() end end
local Tool = script.Parent
Tool.Equipped:connect(function(Mouse) Mouse.KeyDown:connect(growHum) end)
The Equipped event of the Tool passes on the active mouse object. You can use the KeyDown event of this Mouse object to do what you want to do.
Please do remember that this is a LocalScript. |
|
|
| Report Abuse |
|
|
ZeetZeet
|
  |
| Joined: 01 May 2012 |
| Total Posts: 179 |
|
|
| 14 Jun 2012 12:14 AM |
@AgentFireFox
That was what I needed, thanks.
Thanks to everyone for helping me :3 |
|
|
| Report Abuse |
|
|