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

Easier way to see if a key is down?

Asked by 3 years ago
Edited 3 years ago

I'm making a plugin that you can add a data store for a leaderboard or object and I need help with the name part. I want the user using the plugin to click a button and start typing their keyboard and the text of the TextButton will change to what the user typed. Sorry for none of my code because I deleted it to find another way but I still want help. Please? Is there anyone who can help me here?

Edit: I love TextBoxes. They were the answer to this question the whole time.

0
Could you use a TextBox? If not, I'm pretty sure you can use a MouseObject in plugins to which you could use Mouse.KeyDown the8bitdude11 358 — 3y
0
But you would click the text button to start typing, as no other object can have a MouseButton1Click event except for image buttons. The plugin would be used on editor mode, the GUI destroying itself if a player joins with the GUI still open. PoWerofThEePg 43 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago

I found the answer to this, and that is to use the UserInputService.InputBegan to use an if statement to see if they are pressing the key.

Ad

Answer this question