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

Need more help with Gif Playback script (?)

Asked by 7 years ago
Edited 7 years ago
local FPS = 10 -- How many frames per second it will run at.
local ContentProvider = game:GetService("ContentProvider")



local GIF = {"rbxassetid://614166207","http://www.roblox.com/asset/?id=614196198,rbxassetid://614212267","rbxassetid://614243948","rbxassetid://614245502","rbxassetid://614624256","rbxassetid://614652355","rbxassetid://614749146","rbxassetid://614750178","http://www.roblox.com/asset/?id=166249907","rbxassetid://614751359","rbxassetid://614755688","rbxassetid://614756818","http://www.roblox.com/asset/?id=166249942","http://www.roblox.com/asset/?id=166249964","rbxassetid://614758943","rbxassetid://614761035","rbxassetid://614764045","http://www.roblox.com/asset/?id=166250031"} 

local ImageLabel = script.Parent:WaitForChild("ImageLabel")


for _, i in pairs(GIF) do
    ContentProvider:Preload(i) -- This is supposed to preload each image, so images don't blindingly flash people in the face because of the images loading one after another instead of preloading all of the images.
end


print("Assets are loading...")

while ContentProvider.RequestQueueSize > 0 do
    wait() 
end

print("Assets loaded!")


while true do
    for i = 1, #GIF, 1 do -- Run through the GIF table.
        ImageLabel.Image = GIF[i]
        wait(1/FPS)
    end
end





-There is a blank image( the loading image) before each image into the imagelabel. I want to get rid of the loading image.

0
Help? JoeRaptor 72 — 7y

Answer this question