Let's say I have several parts named "x.poop" and others named "x.boop" (x being different names for all the parts) in the same directory, would I be able to modify only the .poop ones?
Like "if part.Name == (has the .poop extension) then ..."
Let's say I have several parts named "x.poop" and others named "x.boop" (x being different names for all the parts) in the same directory, would I be able to modify only the .poop ones?
Like "if part.Name == (has the .poop extension) then ..."
Hi radus,
####Like this:
if string.sub(part.Name, 3, 6) == "poop" then
print("It's poop.");
end
##Well, hope I helped and have a wonderful day/night.
Thanks,
Best regards,
~~ KingLoneCat
This will take the third character and go all the way to the sixth character in the string and inclusively print that. Meaning that it will also print the 3rd and the 6th characters in the string.
Not print but, compare that.
thanks that seems to work!
Good.
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
yeah