I know some things have changed. But I can't find what I need to fix to get this script working again. It's supposed to trigger a function if the player hits a bullseye on a target block.
import { world } from "@minecraft/server"
world.events.projectileHit.subscribe(eventData => {
const { source, blockHit } = eventData
if (!source.hasTag("gamer")) return;
const block = blockHit.getBlock()
if (!block) return;
let power = block.getRedstonePower()
if (power >= 14) return;
source.runCommandAsync(`function getkey`)
})
Interesting, does the trident work if you do the same as arrow, just throw on trapdoor than drop the tridents