#giving HP to certain parts

1 messages · Page 1 of 1 (latest)

simple cave
#

hello, I'm making a system where certain parts can be destroyed by weapons, and each part has a certain durability. are there any issues with this implementation?

  1. create "DestructibleParts" folder in workspace
  2. add parts that should be able to be destroyed into this folder, and create a numbervalue for the part durability under the part
  3. when weapon collides with part, check if part.Parent is the DestructibleParts folder
  4. if so, then deduct HP from the numbervalue in the part and delete if under 0
echo lion
#

that should work yeah

tardy nymph
#

You could give those parts a tag called "Destructible"

#

And give them attributes

simple cave
#

thanks

blissful thistle
#

CollectionService is more robust than requiring everything be in a specific folder