i want to make a propertie called "sheild" which means the sheild health must be depleated in order for the actual health to be depleted.
✓ ANSWER ACCEPTED
Hey is there any way to add a new humanoid propertie? "Sheild"
2 answers
✓ Accepted answer
Yeah, you could do this various ways. Although, you would have to go through each script that takes damage and modify it.
The first way is the nooby number value way.
Create a Shield NumberValue and insert it into the character.
A better alternative is making a module.
local Table = {
MaxShieldHealth = 50
ShieldHealth = 20
}
local Humanoid = script.Parent:FindFirstChild("Humanoid")
function Table:TakeDamage(Damage)
--script this yourself
end
return Table
and in other scripts you can just do
local Character = Player.Character
local ShieldModule = require(Character.Shield)
print(ShieldModule.ShieldHealth)
print(ShieldModule.MaxShieldHealth)
ShieldModule:TakeDamage(69) -- ;)
If this helped you, accept this answer Or feel my wrath.
can't add a property but you could manipulate one of the already existing properties. Say increased health, and when health is above a certain number it could be considered apart of the shield's durability metre. Unless you wanted them working separately and you'd have to use your own system cx.
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
feel his wrath!
no