Ok so i am making a game a bit like pet simulator where you Can click on a thing like a box you do something to that npc and get some coins and the npc or coins need a custom health bar and Idk how to make that also the player Can do it and when you get pets on they go atack and you damage more when also using pets
Do you mean something like coins leaderstats?
No like coins you can mine like in pet simulator x
Like something you pick up off the ground? I’ve never played so your description isn’t working for me.
Basically you’re going to just put 2 number values in the model for the coins (or store them in a script) with one as max health, and the other as current health, then when a player clicks a model, you’re going to send the NPC (or pets) over to it, to start attacking and doing their amount of damage to the current health.
When the current health is 0 you award the coins.
but like how do i make the pets send and damage the npc
You’ll need to develop your own systems for this, the majority of them are relatively easy such as the pet following system. You can use resources such as LuaBearyGood’s pet system.
Someone here already posted that you will need to use Health values as well. You can link the Mouse.Button1Down signal to a remote that checks for the health of a box and rewards coins if it’s below 0, elsewhere it will take the health of the box down.
but how do i make so the player can mine the coins and get coins
can i get the link of the coin system like the link to devforum
You’ll need to program it yourself.
but idk how to use remotes to link a button to check