I'd like to make a script for Cafe food example: A cookie, how do I make it where the avatar picks it up (in the inventory) and then eat's it? Please help, thank you :)
Well first off make your food model, if it has multiple parts either weld them together or make them into a union, then rename the part to Handle
and place it in a tool, now when a player touches the food it will go in their inventory. Mess around with the gripPos until the player holds the food correctly, then your tool is ready.
As for scripting I won't write out a whole script for you as that's not what this website is for, but I will point you in the direction of what you need to do.
You'll want to put a local script inside your tool (and a sound effect if you'd like)
In your script if the player clicks their mouse while holding the item, you'll want to change the tool's gripPos so that the food is placed at their mouth (This will take some trial and error) then you can play the sound effect if you decide to use one, then wait a second or two, and either destroy the tool if you want the food to be consumed, or just set the gripPos back to its original setting. However if you don't destroy the tool you'll have to go through extra measures to script a cooldown to ensure the player can't spam click
Hope this helps!