How to give items on making a map

LqlexBoi
Joined 17/07/2020
Posts 1
08:34 PM 10/09/2020
i want to make a sword fight game, but idk how to give items.
in the option it give "item0" and i dont know how to modify it.
Please help, if i make Right Click it says only "Delete".
Sorry for gram errors, i'm italian.
Thanks for who reply.


[Code] Noah Cool Boy
Joined 20/06/2019
Posts 1,129
05:43 AM 11/09/2020
You can make a tool with
var myNewTool = new Tool("Sword")
You can then give it to a player
MyPlayer.addTool(myNewTool)
Or hand it to all players
Game.players.forEach(v=>v.addTool(myNewTool))
Or give it when a player joins
Game.on("playerJoin",player=>player.addTool(myNewTool))

I typed this out on mobile, so something may not work


[Code] Noah Cool Boy
Joined 20/06/2019
Posts 1,129
05:45 AM 11/09/2020
I forgot to mention, you can always check out the documentation here
https://brickhill.gitlab.io/open-source/node-hill/classes/tool.html

1