I am working on a Part Placement System and I had it have a Part rotate and switch to look like another part by Players pressing a specific Key on their Keyboard. Although this works, I also made a ScreenGui in which players without a Keyboard could press and the same thing happens (Part rotating and switching to another Part). Does anyone know how to implement this into the LocalScript below at the “elseif” statements to sense a player pressing the letter and also sensing if the Button in the ScreenGui has been pressed? Any help would be appreciated.
SCRIPT (only the portion of the entire script in which I want to add the sensing for the Button has been pressed):
elseif keyCode == keyCodeEnum.Q then placeablePointer = placeablePointer - 1; if placeablePointer < 1 then placeablePointer = #placeable; end registerGhost(); elseif keyCode == keyCodeEnum.E then placeablePointer = placeablePointer + 1;
another note (if you need this information):
The button is under a frame which the frame is under the ScreenGui. Another thing is that this LocalScript is located under StarterCharacterScripts (located under StarterPlayer).