I want to use string.find() to find the word “Poop” in a part / model’s name, but I am not sure how to use that in this situation as its not going through a string, rather through a .Touched function.
script.Parent.Touched:Connect(function(hit)
if hit.Parent.Name == "Poop" then
--nonesense code here
end
end)
Would I do something like this ?
script.Parent.Touched:Connect(function(hit)
if hit.Parent.Name.find("Poop") then
--nonesense code here
end
end)