How to replace images and keep its same Id?

I created dozens of images currently used in various parts of my game.
I need to retouch these images, but I don’t want to create new images with a new Id, as I will have a lot of work to put the new Id in each Image field.

How can I replace a current image with another image and keep the same Id of this image?

You can’t.

2 Likes

Just use a local plugin to do it for you

local old_id = -- put the old one here to be replaced

local new_id = -- put the new id that you want to use to replace the old one

local function HasProperty(v,i)
  return pcall(function() return v[i] end)
end

for i, v in pairs(workspace:GetDescendants()) do -- loop through each instance inside of workspace
  if HasProperty(v, 'Image') and v.Image == old_id then -- checks if it has the 'Image' property and has the old id
    v.Image == new_id -- changes it to the new id
  end
end
2 Likes

Sadly, you cannot. You cannot change a image and keep the same ID. If in the focus of decals, you will have to create a new decal to get a new image resulting in the ID being different.

1 Like

I don’t think this would work since this is placed in Studio and is not being placed within Roblox decal files. It may work since I am not a scripter, I am a website developer but it is worth a try.

-Snowflake

Its a local plugin so it can run whilst inside of development and help with development

Sorry for reviving this old post but now you can do so with Packages, which easily allow you to change all assets in a game and push updates to all other places linked :slight_smile:

Thanks, but this has nothing to do with the op.

It does. With packages you can change an image without changing the ID.

Could you show a proof? Get an image by its Id, and replace it by another, keeping the same Id.

I didn’t ask for an article. I asked for a proof, an example.

The article is more than enough proof. It’s an official Roblox page/feature page.

You are confusing things. That’s why I asked you to test it yourself to understand that what you said doesn’t make sense. Nevermind.