I have a gif and would like to smooth it out, here is the code, I assume its the wait or the texture changing it, which causing a flashing effect? Thanks!
Code:
local clickdetector = game.Workspace.button.ClickDetector
FPS = 6.25
IDs = {2995023595,2995023595,2995023595,2995023595,2995023595,2995023595,2995023595,2995023595,2995023595,2995023595,2995023595,2995023595,2995023595,2995023595,2995023595,2995023595,2995023595,2995023595,2995023595,2995023595,2995023595,2995023595,2995023595,2995023595,2995023595,2995023595,2995023595,2995023595,2995023595,2995023595,2995023595,2995023595,2995023595,2995023595,2995023595,2995023595,2995023595,2995023595,2995023595,2995023595,2995023595,2995023715,2995023780,2995023836,2995023903,2995023780,2995024021,2995024077,2995024141,2995024191,2995024260,2995024323,2995024391,2995024446,2995024503,2995024564,2995024620,2995024684,2995024733,2995024795,2995024846,2995024910,2995024979,2995025036} --Insert your image IDs here (Comma separated)
local sound = Instance.new("Sound", game.Workspace.VP.Part)
sound.SoundId = "rbxassetid://2989110083"
sound:Play()
for N,F in ipairs(IDs) do
game:GetService("ContentProvider"):Preload("http://www.roblox.com/asset/?id="..F) -- This preloads each decal, so you don't have to deal with flashing decals.
end
function play()
for N,F in ipairs(IDs) do
script.Parent.SurfaceGui.ImageLabel.Image = "http://www.roblox.com/asset/?id="..F
wait(1/FPS)
end
end
clickdetector.MouseClick:Connect(function()
play()
end)
