Hi, i need to make a script to pick up an item, and when that is done, it gives health to the player, like a medkit, the item have got to disappear after picked up, how do i do that? (C# Please)
You need to attach collider / triggers to your player object and the pick-up. Once that is done you will use the OnTriggerEnter handler in either of your objects to determine if the objects that collided are of the type that makes the magic happen.
Public variables representing the value of health or other power-up would be stored in a behavior on your pick-up item.
You can use “Tags” to mark objects like the “Player” and get the instance of that item in your scene with GameObject.FindWithTag(“Player”) etc.
I’m surprised the commenters didn’t at least take a stab at moving you in the right direction. Definitely go through the tutorials though; you’ll save yourself a lot of effort and heartache down the road.