Glitchless Video Script For Split Gif Images?

My question is is there any other more efficient ways of doing this, the only way I managed to do this is having 3 image labels. One Storing the value of the previous Label, and the other one storing the label of the previous before that, Which allowed for glitchless video, anyother ways of getting this done? So it can sync better maybe with music?

local RS = game:GetService("RunService")
local TimeBetweenFrame = 0.08

local Frame = script.Parent

local SavedImage

local lastSaved


local amount = #Frame.Images:GetChildren()

for i,v in pairs(Frame.Images:GetChildren()) do
	if amount == i then


	local CurrentFrameImage = Frame.Images:FindFirstChild(tonumber(i))
	if Frame.Encoder.Image ~= CurrentFrameImage.Texture then
	if Frame.LImage.Image ~= Frame.Encoder.Image then
	if Frame.AImage.Image ~= Frame.Encoder.Image then

	while not Frame.Encoder.IsLoaded do RS.Heartbeat:Wait() end

Here is a video of how it looks like in motion.
robloxapp-20220427-0035577.wmv (2.7 MB)


I used to make “gifs” years ago.

What do you mean by “glitches”?

If the “glitches” are the image disappearing for a moment when Image is changed, then my approach was to keep all the frames available, but hidden or clipped.
When you advance to the next frame, hide the current frame and show the next one, but don’t change the Image property.

In hindsight, I could have done better by keeping two ImageFrames: the currently visible one and the hidden next frame.
To advance to the next frame, the “current” frame is hidden, the “next” frame is shown, the two variables are swapped and the “next” (hidden) frame’s Image property is changed. If the next image does blink due to Image changing, then it doesn’t matter because it’s now invisible.

If you want to sync with the music, then you could use Sound.TimePosition to time your animation.
Create a variable for the time when the next frame should be shown.
When Sound.TimePosition is higher than this variable, advance to the next frame and add TimeBetweenFrame to this variable.

Basically when I used only one image the time it took to load was to long so I had to create a backlog of the images because when I changed the image it goes blank for about 0.2 of a second

If this happens only on the first loop, then the images definitely haven’t loaded and you should preload the images and music before showing the animation.

If it always goes blank for a little while even if the image has been seen before, then it’s the same issue I had and you should hide and unhide frames instead of changing the Image property.

1 Like

Thanks I didnt know such thing existed will use it not letting me choose your answer as solution don’t know why. Also I have an additional questions , how do you mutli upload files, I had to click all of the 200 images manually then changed the name with script but how to do all at once ;/

I think there’s a mass upload tool somewhere in Studio, look for it.

Before that was added, I had to just upload my own images one by one, too. It wasn’t too bad because I had few frames and put many frames on one image, so I had few images to upload. Some still managed to get moderated :frowning_face:


This might be because of the subforum (creations feedback, not help)

1 Like

This is a bit off topic, but also I wanted to make a procedurally infinite Terrain map, but, it lags a lot because a lot of terrain wants to get generated if there is lots of people walking. Even when one large chunk is loading it will lag the game, so I thought about adding more wait time but than it took forever to load… So I came up with the idea of the initial map having to load with lag so its fast for the player to start playing with bare minimum, and maybe have a vote system which allows more map to be generated with a load-screen or something because it will lag. Furthermore, I dont think you can generate terrain from localscript so That the best idea I have, do you have any suggestions?

I used co routine to thread my loops for the terrain generation

I know more threads is worse for performance but Im only using 4 threads whats the optimum you think sorry for making so many replies

It should be possible to just generate fewer parts (combine cubes into larger cuboids to reduce part count for example) to reduce the lag from stuff being loaded to all players.
And if you mean that the code doesn’t run very fast, then I don’t think multithreading will help with that unless you use it in advantageous ways.
It’s not clear what you’re saying because ‘lag’ can mean a lot of things.

One of the advantages of chunked terrain generation is that it can be done exactly the same way multiple times. You can input a seed in Minecraft to get the same map as someone else, for example.
You absolutely can do this if your terrain can generate the same way on all clients.
The problem with this is that the server doesn’t see the terrain the clients generate unless it generates the terrain itself. That might cause server lag. If you put the terrain in Workspace instead of ServerStorage, then it will also be loaded to all players, which duplicates effort.

Its not parts is terrain like sand and stuff, by lag I mean all of the scripts become delayed like you will come up the bush to harvest and it will happen after 10 seconds

So I could maybe create a simplified version of the map on the server and the complex individual on local script since i didnt know you can do that.

but than people with slower pcs might not be able to play

Yeah, that’s the script being slow, I can’t really help with that.

It’s when you generate terrain a piece at a time, splitting the generation into chunks. You generate each chunk only as needed, and can possibly delete chunks that are far from any player if they haven’t been changed in any way.

You should probably take chatroom-like replies to private messages btw, but it’s a too late for that by now.

edit: There’s probably a Survival series game with infinite terrain, look at the games created by Davidii or one of the games in his group, I think the infinite terrain one is open source by now. It’s been half a decade so I don’t remember which one it was.

1 Like

Yeah it was probably with parts tho not terrain

So what do you think I should make the map load on singleplayer for the terrain and create a similifed procedural method with parts to make the scripts work for the animals, Or is it just better to keep it in workspace and do it for the server and stick to the vote system idea. Because, I’m thinking that its not gonna help much there is still going to be bare parts spawning for the server for the map and on top of that locally overload for the terrain which will make server lag and local lag with bad pc

Where as if its kept in server just server will lag for a bit like you have gta maps load for that long too, before you join