Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Keyboard Inputting Help?

Asked by 8 years ago

I want to make a gui go in a direction when I press a certain key. For example, W is up. I think the code should look like this, but I don't know how to get it to work.

function onKeyPress(inputObject, gameProcessedEvent)
if inputObject.KeyCode == Enum.KeyCode.W then
position.GUI X + 0.01
end
end
game:GetService("UserInputService").InputBegan:connect(onKeyPress)

Please answer. Thanks!

0
what kind of script is it in, and where? bubbaman73 143 — 8y
0
It would help if we could see the layout you have in the explorer, if you could post that it would be a great help. Also, is this the full script? General_Scripter 425 — 8y

Answer this question