of     1   

UnforeseenVice
#141291008Wednesday, July 23, 2014 5:57 PM GMT

I just need help as to how i would go about pressing a key to start a script then if i press another key it stops it. :P New to Lua
128GB
#141291097Wednesday, July 23, 2014 5:58 PM GMT

The .KeyDown event, from a local script
domorox17
#141291180Wednesday, July 23, 2014 5:59 PM GMT

In a localscript, preferably in StarterPack p = game.Players.LocalPlayer m = p:GetMouse() m.KeyDown:connect(function(key) if key == 'keyhere' then --code elseif key == 'otherkeyhere' then --morecode end end)
HuntHello
#141291221Wednesday, July 23, 2014 6:00 PM GMT

Or you can connect the event to everyone with playeradded
UnforeseenVice
#141291280Wednesday, July 23, 2014 6:00 PM GMT

Thanks, but i have no clue how to incorperate that to my script :/
DeviousDeviation
#141291290Wednesday, July 23, 2014 6:00 PM GMT

game:GetService("ContextActionService"):BindActionToInputTypes("Name", functionToBind, false, Enum.KeyCode.E) owait im a hypocrite
128GB
#141292111Wednesday, July 23, 2014 6:09 PM GMT

Or you can connect the event to everyone with playeradded No you can't, KeyDown only works from localscripts
HuntHello
#141292474Wednesday, July 23, 2014 6:13 PM GMT

128 oh yeah, nvm with that (haven't used in a while )

    of     1