Creating a "GIF" within a mesh

As many of you know mesh parts use asset ID’s, with that being said I’m not entirely sure you could do a spritesheet type gif in this case.

So? What am I attempting to achieve? I want to create mesh that would change between its textures to create a gif, however if the gif was running at 20 frames per second and it was merely two seconds long we’re already looking at 40 images I’d need to upload.

How could I efficiently go about creating something like this?

I was thinking about doing the 40-80 images but I really don’t think this is the best way to do it, let me know if you have any questions!

4 Likes

You have two options to do this.

Option 1: You can use OffsetStudsU and OffsetStudsV properties of a Texture. to make an effect of a texture moving. This can be used in conjunction with sprite sheets to create the effect of a gif. You may also have to play around with the StudsPerTileU and the StudsPerTileV properties to fit the texture properly.

Option 2: You can use the TextureID property of MeshParts. You could preload all of the frames and then simply set the TextureID to the frame you want continuously. This is easy because you don’t have to play around with sprite sheets, but, as you said in your post, it is very inefficient to upload them all and even more inefficient to load them all in.
You could also do this effect with Decals and their Texture property, although this will use roblox’s UV wrap for the mesh and not any preexisting one.

2 Likes

Modifying the OffsetStudsU & OffsetStudsV doesn’t seem to work on Textures inside a mesh part.

1 Like

I think he means to apply a texture instance on all 4 sides and manipulate them all at once with a script that offsets it every second or so.

2 Likes