How do I make the player place items?

I want to make players place blocks by clicking the screen, how do I do that?

just a clarification question: do you want to place the block whenever you use an item or is it just generally clicking?

I want to make so you place blocks so it stays there, like building or something, kinda like fortnite building or building in minecraft I should say

you can use the hunt and gather scripts as a reference.
first, create a unit. you can design the spritesheet however you like. Go to “Body Types” and click on the “type.” change dynamic to static. (this is to make sure it’s locked in place)
Change the sensor to “false” and make sure everything in “collides with” is blue.
make a new consumable item, and then go to scripts. NOT the world scripts, but the little “scripts” button next to the newly created item.
New script, “when this entity (item) is used” as a trigger, create wall for owner of triggering unit facing 0 radians at mouse cursor position of owner of triggering unit.

Can you send like a screenshot or copy the JSON version so I can copy, because it won’t work