#cannot read typeId of undefined
1 messages · Page 1 of 1 (latest)
use optional chaining there too.
?.getComponent(...)
player.dimension?.getBlock(...)
show the error.
is that block loaded?
that's not about getBlock.
?.getComponent
told them to do that already
inv.addItem(new ItemStack("obsidian"))
well hold on, maybe he needs an existing item stack
to copy itemStack data
what is your item variable
nvm I just read what this script was.
use his method.
make sure to import the ItemStack class from server.
uhm, use
item && inv.addItem(item)
?
its like
const item = inv.getItem(number)
if (item) inv.addItem(item)