Can anybody help me make a gui overlay?

i dont really know how to make this only appear on the green> im trying to make it so its trecthed out but only appears on the green if you dont understand ill give a example

What it is rn:

image

what i want (without it going off the green square

image

is there anyway to make this?

I’m confused. What do you want on the green? Are you doing this with code?

im not doing it with code but im curious if im able to size the image bigger, while it still only being visible on the green aka its not going out of the frame

Okay, and what are you trying to place on the green? I can’t see it from the pictures.

do you see those stripes? im trying to add that onto it the second picture is the size i want, but it goes out of the frame

Can’t you put the stripes into the green Gui object (Parent->child), and then set the size of the stripes to (1,0,1,0)?

i did that but it doesnt looks thjat good (first picture)

i basically want to make it invisible when it goes off frame

Hmm. I see. Try keeping The stripes image in the Green Gui, and set the size to (1.5,0,1,0), and set the Green’s DescendantsClipped to true.This should chop off any part of the image that isn’t in the green.

ill try it and see if it works

doesnt seem to work
image

No? Okay, try changing the green object to be instead of a textlabel or whatever Gui object you are using, try a CanvasGroup, and do the same thing.

it works :smiley: Thank you! i not good with gui lol

Great! I’m not sure, but I think CanvasGroups are more performance heavy than regular frames, so If you are using many of these,your game might start lagging a bit. If there is just a few though, you should be good to go.

yeah i think your right but ill try to optimize it by just deleteing them whyern the frame closes and then adding them when its back

1 Like