How can I allow players to insert custom image IDs in my game without this error?

I am trying to add a feature to my game where you can paste image IDs in a GUI to change the texture of your face. I have used InsertService, and it works fine on my own images, but I get the following error when trying to insert an ID for an image that isn’t mine or Roblox’s:


This occurs for both the decal ID and image ID for the texture I tried to use.

I know it is possible for players to insert images not owned by me because many popular games like Welcome to Bloxburg and Work at a Pizza Place allow you to insert images on picture frames when customizing your house.

How could I prevent this and allow players to insert other images?

1 Like

You can either use a decal/texture or use an ImageLabel on a SurfaceGui. Not sure what InsertService would be useful for here because of its restrictions.

1 Like

Like incapaz said, just change the texture of a decal, image label, or any other object that supports the displaying of a texture to the provided ID. There’s no reason to use InsertService to load in an image.

1 Like

The main reason I was trying to use InsertService was so it would get the image ID if a player inserted a decal ID. It works fine doing it the simple way, but it would require players converting decal IDs into image IDs manually since there is no good way to do this.

Use rbxthumb with the type as “Asset”. It automatically does the correction iirc.

2 Likes