Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do you change names of objects while keeping the old name?

I would like to change a name of an object in a way that includes the old object's name. For example, if the object is named "lol", I would like to change the name to "lol's shield" and if it was named "yes" i would like to change the name to "yes's shield". Any suggestions?

1 answer

✓ Accepted answer

I believe this script should work. I might not be very good at explaining.

local oldobject = workspace.yes -- Your object

oldobject.Name = oldobject.Name .. "'s shield" -- "yes" --> "yes's shield"

In Lua, I believe string concatenation essentially adds multiple strings together, seperated by ".."

1 comment

0

Thanks.

This discussion is preserved as it was. New answers, comments, and votes are closed.