DjBadyBoy
|
  |
| Joined: 01 Aug 2011 |
| Total Posts: 681 |
|
|
| 08 Aug 2012 07:56 PM |
How can i make a flashlight that turns on and off when i press "F" key. Can anyone help?
Thanks. |
|
|
| Report Abuse |
|
|
|
| 08 Aug 2012 08:03 PM |
| repeat wait() until script.Parent:HasALife() |
|
|
| Report Abuse |
|
|
DjBadyBoy
|
  |
| Joined: 01 Aug 2011 |
| Total Posts: 681 |
|
| |
|
|
| 08 Aug 2012 08:24 PM |
You use a Tool or HopperBin,make a function using .Selected event,get the argument "mouse",make another event using the mouse argument.
http://wiki.roblox.com/index.php/Selected_%28Event%29 http://wiki.roblox.com/index.php/Mouse |
|
|
| Report Abuse |
|
|
|
| 08 Aug 2012 08:26 PM |
tool = script.Parent
function youpressedbutton(button) if button == "f" then end end
function selected(mouse) mouse.KeyDown:connect(youpressedbutton) end tool.Selected:connect(selected) |
|
|
| Report Abuse |
|
|