Oh I got it work. I wasn’t turning off the gameobjectdown event, or at least I think thats why its working. Thanks anyway though! I did it in the state machine and it worked.
this.toolSelectScene = scene.scene.get("ToolSelectScene")
this.toolSelectScene.input.on("gameobjectdown", (pointer, object) => {
if (object.frame.name == "swordsprite.png") {
scene.input.off("gameobjectdown")
this.stateMachine.transition("useSword")
}
if (object.frame.name == "firesprite.png") {
scene.input.off("gameobjectdown")
this.stateMachine.transition("useFire")
}
})