of     1   

RoyStanford
#85362397Thursday, December 27, 2012 12:34 AM GMT

In my game, many scripts utilize the event that detects the keyboard input of a player. Obviously a player can't press keys on an iPad, so I wanted to make GUIs for certain keys. Is it possible to do this?
orangegreenblue
#85363141Thursday, December 27, 2012 12:43 AM GMT

Just make the buttons invoke the code? like function Q() --do something end --Assume the Mouse object is obtained from somewhere Mouse.KeyDown:connect(function(Key) if Key == "Q" then Q() end end) --Assume QGui is a button of some sort QGui.MouseButton1Click:connect(Q) -orangegreenblue, the Lua Noob
RoyStanford
#85363555Thursday, December 27, 2012 12:47 AM GMT

No, my goal is to have the KeyDown event fire somehow when a GUI is pressed. Maybe something similar to the method SetKeyUp?
orangegreenblue
#85364421Thursday, December 27, 2012 12:58 AM GMT

function KeyDown(Key) if Key == "q" then --do something end end Mouse.KeyDown:connect(KeyDown) QGui.MouseButton1Click:connect(function() KeyDown("q") end) -orangegreenblue, the Lua Noob
RoyStanford
#85364862Thursday, December 27, 2012 1:03 AM GMT

Not what I was looking for but thanks anyways. All of the methods that were of use to me were protected.
crouton04
#85366638Thursday, December 27, 2012 1:24 AM GMT

Yeah it's possible.. But it'd be a totally different script. So you could have two different scripts, one to function for people without ipad, and the other with(Using guis).

    of     1