How do I replace text within a .name?

I’ve tried string.split, gsub, etc. I’m trying to remove “Dog” from a object.Name.
For some reason (my syntax is clearly off) I’m not getting any results.

object.Name = string.gsub(object.Name, “Dog”, “”)

Can you give me your script and some examples?

object.Name = string.gsub(object.Name, “Dog”, “”)

This worked, I had not specified the text to replace it with previously.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.