#what's wrong with this code?

1 messages · Page 1 of 1 (latest)

ornate meadow
#

I wrote this:

    player.runCommandAsync("give @s diamond")
  }```
but it's not working, how can I fix it?
quick palm
#

Try this

if (player.isSneaking && heldItem?.typeId === "cd:foice_kura") {
    player.runCommandAsync("give @s diamond")
  }```
#

@ornate meadow