#What went wrong?
1 messages · Page 1 of 1 (latest)
because the textbox's text is only being declared as nil when the script starts, define the new number inside the button1click event into healamount
how did i miss that 😭
i moved the health variable to the function for the exact same reason
happens to us all
oh great even more issues
what
If you want to regen
probably cuz you touched the damage part multiple times and it has a .spawn function that delays the damage or something lol
You can also put a negative nulber with takedamage
i was gonna do a seperate button for that i didnt even realise you could just put negatives
i mean maybe, i just grabbed whatever damage part i found so i could test it
no yeah it works
bad damage part
Instead of humanoid.health .. try :
humanoid:TakeDamage(-1 * tonumber(HealthAmount)
why
Its just another option
does this like stop you from taking damage from it
let me test
Its just heal you
i see
also is that your artwork on the gui?
Since i guess the number we put as argument in take damage is substracted to the health, but if its a negative its like health - (-number) wich is like health + number
But what u did is totally fine
So its working now right?
yes
What was the error ? Like poe said ?
i think ill use the same textbox for the damage button too and just make both of them grab values from the textbox
yes
or just put a neg number into the textbox and press heal lol
spix gave me an equation that only heals so i think its less confusing to bumbling idiots if i add a second damage button
Give up on scripting
let buddy be