davy545
|
  |
| Joined: 01 Sep 2008 |
| Total Posts: 199 |
|
|
| 06 Mar 2013 06:15 PM |
| Is there a way to make a function trigger after having a key hit without the script being within a tool? |
|
|
| Report Abuse |
|
|
dekkonot
|
  |
| Joined: 22 Dec 2010 |
| Total Posts: 6685 |
|
|
| 06 Mar 2013 06:17 PM |
| Yes. Use a localscript and the GetMouse method on the localplayer to get the mouse. |
|
|
| Report Abuse |
|
|
|
| 06 Mar 2013 06:18 PM |
local Player = Game.Players.LocalPlayer local Mouse = Player:GetMouse() Mouse.Button1Down:connect(function() print("Button 1 is down") end)
put this script in a localscript inside a player's playergui, or startergui.
-[MassiveGman] |
|
|
| Report Abuse |
|
|
|
| 06 Mar 2013 06:19 PM |
http://wiki.roblox.com/index.php/GetMouse_(Method)/Player
-[MassiveGman] |
|
|
| Report Abuse |
|
|
davy545
|
  |
| Joined: 01 Sep 2008 |
| Total Posts: 199 |
|
| |
|