I have a Lightsaber that requires you to press "Q" to Ignite so does anyone know how to make a script that when you press a GUI button it will Output the Keycode Q so that people can Ignite on mobile.
COMMUNITY QUESTION
how to make a GUI Button that when pressed does the same thing as press'ing the Q Key?
1 answer
Instead of trying to fake a keypress, create a boolean value in the player and change it's value to true when the GUI button is pressed. Have the tool watch that value with .Changed and ignite if it's true and set it back to false. Assuming the tool script is a local script as well
This discussion is preserved as it was. New answers, comments, and votes are closed.
