I'm stuck on how to find when a player presses a button like "G" or anything
We need to use ContextActionService For input or even UserInputService
local cas = game:GetService("ContextActionService") function onKeyPress(actionName, userInputState, inputObject) if userInputState == Enum.UserInputState.Begin then -- gets the input print("R was pressed") end end cas:BindAction("keyPress", onKeyPress, false, Enum.KeyCode.R)
On the final line of code It does the function when you press R on your keyboard You can change Enum.KeyCode.R to What key you want(ex. Enum.KeyCode.Z)
You can use UserInputService.
For ex you can write :
local UIS = game:GetService("UserInputService") UIS.InputBegan:connect(function(Input) local KeyCode = Input.KeyCode if KeyCode == Enum.KeyCode.G then print("G was pressed") end)