Ovations, everyone. I was writing a script, where it renames your tool when you touch something. My tool is called Mop and it is still renaming it to Mop | 3/3 .. What is the problem with my script? I would be glad if anyone could help me.
script.Parent.Touched:connect(function(h)
if h.Parent.Name == "Mop" then
h.Parent.Name = "Mop | 1/3"
elseif h.Parent.Name == "Mop | 1/3" then
h.Parent.Name = "Mop | 2/3"
elseif h.Parent.Name == "Mop | 2/3" then
h.Parent.Name = "Mop | 3/3"
end
end)
Every single help is appreciated, thank you!

5 comments
It still names it "Mop | 3/3" when it should call it "Mop | 1/3" as the tool is called "Mop". Your answer is appreciated tho!
have you tried placing a print in .Touched and .TouchEnded?
Yep, they both printed. It gotta be an issue with the renaming.
how often did they print
Really often, I think I found the problem btw. It goes trough every step so fast that I cannot even see it. Like, it renames it to 1/3 but then it renames it to 2/3 so fast that I cannot see it.