New to scripting. But i need this script to run when i press a certain key, preferably “G”.
Try
if(Input.GetKeyDown(KeyCode.G)) {
// whatever
}
New to scripting. But i need this script to run when i press a certain key, preferably “G”.
Try
if(Input.GetKeyDown(KeyCode.G)) {
// whatever
}