Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to let a script repeat itself?

Asked by 4 years ago

I am making a main menu with a imagelabel in the background. i was trying to make it that the background changes every 20 seconds.

while true do
    script.Parent.Image = "http://www.roblox.com/asset/?id=4877293166"
    wait(1)
    script.Parent.Image = "http://www.roblox.com/asset/?id=4877292665"
end

this is teh code that i have and i cant find a fix for its so thats why its here now.

second question: Can i make the images fade in and out?

1 answer

Log in to vote
0
Answered by 4 years ago
  1. I think you should do that:
while true do
    script.Parent.Image = "http://www.roblox.com/asset/?id=4877293166"
    wait (20)
    script.Parent.Image = "http://www.roblox.com/asset/?id=4877292665"
    wait (20)
end

However, to 2, I don't know.

0
Yes its working thanks alot loganmatt3 10 — 4y
Ad

Answer this question