Is it possible to create overlay like this? (creating eyes)

Hello!

I want to make overlay like this

Eyes

but with the pupils inside the eyes image

but if I add “pupils”, its not inside those eyes (not cropped by eye outline)

I’m not familiar with guis, pardon me if this is simple problem.

1 Like

No, not really. It’s not really possible to have that in roblox. One way you can do this is to use canvas groups but have them completely circular so the ability of having different eye shape is completely removed. Another way you could do this is to again have canvas groups but have it parents to the eye image and then add the pupils inside.

Something like so:
image

Do ensure that the background transparency property of the canvas group is set to 1 so that you will not be able to see it.

Obviously this isn’t perfect but it’s the best and only method.

2 Likes

I see, thanks for the response!

I’ll try to mess around with these to see if it would behave as I wanted to be.

I do think its possiple!! But not with Gui! I have attempted to do something simmilar. I layered textures and updated the U and V cordinates to move the eyes around!


Sorry for very late reply

Can you explain more on this? visual would help

1 Like

Sure!


This is basically how the layering is done. Its controlled by the Zindex (which can be finicky at times) so the higher the zindex the higher the layer is.

My mesh is split up so I can move the eyes separate from one another, but this isnt necessary.

when using a texture they have these values
image

I wanted my skin and eyes to be recolorable so their textures are black and white wich allowes them to be reclored by the color3 value.
The offsetStudsU and ofsetStudsV is what controls the left and right, up and down movement of the texture. So when moving the eyes around you would change these values.

The studsPerTileU and studsPerTileV basically conrtoll the zoom of your texture. I have multiple eyes and such on one texture like a sprite sheet so that I can change the emotions simply by updating the ofset values. Since the zoom is set in such a way that only one eye is present at once


you can kinda see one of the other eyes on the side of the face in this one since the spacing between my different eyes isnt big enough

So uh yeah! When making your eyes make the inside transparent and when making your pupils don’t make them take up all the room on the image. leave just enough for them to “roll” around comfortably.
If you don’t care to move the two eyes separately from each other, your setup might look something like this (but completely transparent)

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.