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

How Do I Make A Changing ImageLabel?

Asked by 9 years ago

I'm trying to make a video GUI, and I realized the only way to do this is to have multiple images in motion. So, I didn't want to make a long script, with multiple lines like an advanced scripter, I wanted to just change one ImageLabel and that is basicly it. Also, I want it to be** on the click of an TextButton!** Thanks :3. Oh, and is there an easier way? Please tell me if there is!

0
You're welcome! EzraNehemiah_TF2 3552 — 9y

1 answer

Log in to vote
1
Answered by 9 years ago

First off, use wait(). wait() goes at 1/30 of a second. Which is exactly how some movies fps's are. (Frames Per Second.) 1/24, 1/25,1/30 of a second is all frame time. So we can do this:

while wait() do
    script.Parent.Texture = blah
    wait()
    script.Parent.Texture = blahblah
end

but this isn't the best way to do so. Try this, it's an idea:

local frame = 1
frames = {00000, 000001} --Add all the ids here.

function loop()
    frame = 1
    repeat
        script.Parent.Texture = "http://www.roblox.com/asset/?id="..frames[frame]
        wait()
        frame = frame+1
    until frame >= #frames
    loop()
end

Hope this helps!

0
By texture, you meant image, but i know enough about scripting to replace it, so anyways, thanks ! :D You were still a great help. ScriptingGrape 0 — 9y
Ad

Answer this question