So I want to use the function I made but only if the part is touched by a part named "Bullet" I have this:
debounce = false
health = script.Parent.Parent.Health
function onTouch(hit)
if debounce == false then
debounce = true
health.Value = health.Value - 1
debounce = false
end
end
script.Parent.Touched:connect(onTouch)
So, how do I use the function if only the part that touched it is named "Bullet"?

2 comments
Thank you.... You forgot to put an end at one of the ifs.. But I fixed it!
Heh, my bad. Sorry. Good think you caught that. Lol.