Mouse discovering menu(?) effect

I really don’t know how to put this, hence the bad title.

I basically want my mouse to light up a radius of the UI it is approaching. Then when the mouse leaves that part of the UI it will darken again. I can’t think of many examples right now other than this.

That is a video of Endoparasitic gameplay. What I want is that darkness corner effect the character has around him, but with the mouse and the UI. Is this even possible in Roblox?

I’m sorry for the confusing post, if anyone knows what I’m talking about, help me out with this. Thanks in advance.

2 Likes

You want a LocalScript that iterates indefinitely (while loop) and get the Mouse’s position every time. If the mouse is x pixels from the UI, then Tween some property of the UI to make it “light up”. When the mouse is x or more pixels away, then it will Tween back to its original property.

1 Like

But this would light up the whole UI element wouldn’t it?

I want only a the UI that’s inside the mouse radius to light up.

Then change the properties of only a certain UI element. You don’t have to change the entire UI element.

1 Like

I don’t think you understand me.

I mean different transparencies inside one UI element. Let’s say, for example, an ImageLabel. Then I don’t want the whole thing to light up,just the part of it that’s being hovered over with the mouse.

You can have a spherical frame follow the mouse (set the frame to the mouse’s location every heartbeat). Make this frame “light up” whenever it approaches another UI element.

As for “different transparencies”, yes you would not be able to light up parts of one element. If you wanted to do that, you’d need to make more sophisticated UI.

1 Like

Might be an approach, I’ll look into it.

1 Like

Addition:

I want THIS

That link has a test of exactly what I mean.

You have to be a bit more specific. Give us the time in the video where the effect is noticeable.

Do you mean the light effect getting dimmer farther from the player, or the black blobs around that area? I wasn’t going to search through the entire video to see if there was a GUI that was being lit up at the same time.

2 Likes

For an effect like that, you would use an image that has a center cutout, and then the rest surrounding it is complete darkness.

After that, make it ginormous, larger than the default 1,0, 1,0 if it is possible.

Finally, add a script to make it go to the mouse position.

Hopefully this was able to solve your issue.

Edit: I forgot to mention, set the ZIndex to around 5.

image

An image like this (but completely square and the circle is smaller) should suffice.

1 Like

I meant how the character has a radius that lights up, with the rest of the room being dark. Now imagine the character is the player’s mouse, well, that.

1 Like

This worked, thanks for the help

1 Like

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