Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I add health properties to items like Planes for when they`re shot at?

I don`t want to use the ROBLOX Humanoid service, but rather another method hopefully. Thanks everyone!

2 answers

You can use a IntValue and have it when they are hit it subtracts from the value.

Add a value, like this.

val = 0

Then, make it everytime it is shot, add a number(that you want)

--lets say the planes wing will get damaged. Its named wing.--
--lets say the bullet is named b.--
Workspace.Wing.Touched:connect(function(s)
if s.Name == "b" then
val = val + 10
end
end)

Now that we have that, we have to check if the damage value is 100, and if it is it destroys the planes wing.

if val == 100 then
Workspace.Wing:Destroy()
end

I hope this helped.

This discussion is preserved as it was. New answers, comments, and votes are closed.