Image loading issues through scripts

  1. What do you want to achieve?
    Fix the issues with images

  2. What is the issue?
    When I attempt to set an image on a screenGui via a script, it doesn’t work; here’s some information.

  • The images have been uploaded properly and are viewable in-game
  • When the script sets the image, if you go into properties, you can see that the image has been set, it just doesn’t display.
  1. What solutions have you tried so far?
    I have tried a multitude of solutions such as adding “rbxassetid://” before the string of numbers.

This is an example of how I have scripted this feature previously and it has worked, I don’t understand what has happened since then, could this have something to do with it running in a localscript?

examplegui.examplepicture.image = "rbxassetid://" .. 12345678
2 Likes

Try restarting Studio / wait some minutes, it could be the imagine not loading properly.

Some reasons for it not displaying could be not being inside a ScreenGui or Frame

If you have set it inside a ScreenGui, make sure the ScreenGui’s property ‘Enabled’ is true, if it’s a frame instead make sure the frame is visible.

I do not have more ideas sorry

examplegui? Have you tried setting it in PlayerGui instead? I think it breaks because of this

That was just example code to show how I would set an image using a script, not the actual directory

I think you are putting the decal id, not the image id, so first try inserting the id in a roblox studio decal or texture, then copy that again and change it in the script.

1 Like

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