Okay, right so I have this script I put in to my one of my tools. It works absolutely fine, but how can I get it so that if the name is "BloodSponge" it will not effect the "Blood"?
EDIT-
Tool>Sponge>Script is here<
Sponge touches hit.Name == "Blood" then it then the Blood removes itself,
function onTouch(hit)
if hit.Name == "Blood" then
hit.Transparency = 0.2
wait(0.2)
hit:Remove()
then the Sponge aka ketchup new name is "BloodSponge" and turns red.
ketchup.Name = "BloodSponge"
ketchup.BrickColor = BrickColor.new("Bright red")
end
end
script.Parent.Touched:connect(onTouch)
How can I get it so when ketchup.Name = "BloodSponge" it will not remove the "Blood"?
Full script
ketchup = script.Parent
function onTouch(hit)
if hit.Name == "Blood" then
hit.Transparency = 0.2
wait(0.2)
hit:Remove()
ketchup.Name = "BloodSponge"
ketchup.BrickColor = BrickColor.new("Bright red")
end
end
script.Parent.Touched:connect(onTouch)

1 comment
Can you elaborate on what you want? Re-word it please.