Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I code custom items, for example, a Health Potion?

Asked by
Icven 0
6 years ago

So, lets say I wanted to make for example, a Health Potion. How would I make it and how would I code it's function?

1 answer

Log in to vote
0
Answered by 6 years ago

You would have to plan out:

  • How your players will get such a potion
  • How you will show your players when they have it
  • How they can use it (ex click a button or press a key)
  • How to give them the health they're supposed to receive

This is not small topic, so you'll have to try it out yourself and ask help on the way (as needed). A simpler project would be to make a healing brick that heals on touch. For that, you need only use an OnTouched function (with the brick's .Touch event) to the function that (after making sure that what touched it is a player, not a projectile/weapon/other), grants the player health (ex by changing their Humanoid's .Health).

Ad

Answer this question