How to make an image change in a script

local Image = script.Parent

while true do

Image.Image = "http://www.roblox.com/asset/?id=4504065102"

wait(1)

Image.Image = "http://www.roblox.com/asset/?id=4504066589"

end

The image isn’t changing, idk what im doing wrong

4 Likes

Let me explain what your code is doing right now:

  • Setting the image to 4504065102
  • Waiting a second
  • Setting the image to 4504066589
  • Setting the image to 4504065102
  • Waiting a second
  • Setting the image to 4504066589
  • and repeat for infinity

As you can see, there is no delay between some of the image sets, causing it to look as if it’s not changing.

For this reason, you just need to add a wait(1) at the end of your script:

4 Likes

o lol didn’t notice that thx bro

1 Like

you have to write like this: while true do Image.Image = "ID" wait(1) Image.Image = "ID" wait(1)
you can also make a “local TimeWait = Number” and put that inside the wait() and do the same things with the images id.