Hi! I am doing a video by image frame by frame method, but after I updated the image id then the screen starts flickering. Is there any solution to this? Or do I need to preload the images?
I am currently using this method:
https://devforum.roblox.com/t/how-to-make-gifs-and-videos-on-roblox-full-tutorial/1667260
Here is my code:
local localplayer = game:GetService("Players").LocalPlayer
local rs = game:GetService("ReplicatedStorage")
local contentprovider = game:GetService("ContentProvider")
local camerashake = require(game.ReplicatedStorage.CameraShaker)
local Video = localplayer.PlayerGui:WaitForChild("Video")
local HollowPurpleIDTable = { -- 63 image frames goes here
[1] = "rbxassetid://blabla",
}
game.ReplicatedStorage.RE.ClientFX.OnClientEvent:Connect(function(type, theone)
local currentFrame = 0
if type == "HollowPurpleVideo" then
Video.Enabled = true
Video.ImageHere.ImageTransparency = 0
repeat task.wait(0.05)
currentFrame += 1
local imageId = HollowPurpleIDTable[currentFrame]
Video.ImageHere.Image = imageId
print(currentFrame)
until currentFrame >= 63
game:GetService("TweenService"):Create(Video.ImageHere, TweenInfo.new(1.5), {ImageTransparency = 1}):Play()
print('ended')
end