I made a button, and I want that if players press the button. Roblox thinks for example the letter “W” on the keyboard got pressed.
Is this possible?
I made a button, and I want that if players press the button. Roblox thinks for example the letter “W” on the keyboard got pressed.
Is this possible?
Yes it is possible. How you would do it to be simple is check how far the player is to the button or object if there and then check if they press the W letter if they are in a range of this button.
Here is a vid which explains it in more details: Roblox Scripting Tutorial: How to Script a Keybind Door - YouTube
I think this is what you mean anyways. If not please tell me and I will try to help.
Not what i am searching for. That’s a proximity prompt.
There’s a service called VirtualUser that can simulate user input like pressing a W but unfortunately that’s only accessible in command bar not in scripts. So there’s no way to simulate an input, you’ll have to manually call the function or invoke the behavior that happens when the user presses W
Unfortunately this is not possible in Roblox. The best you can do is code your scripts in such a way that the button can just call the same functions that the letter W would.
What are u looking for then? I don’t understand waht u wantr. Not sure why you would need to detect it cuz like @qwertyexpert said u can just code it like that.