I want the bar to turn black once I enter the bar and not once I enter UI.
But it’s not working the way I want, once I set BackgroundTransparency = 1, it’s turning black before I enter the bar itself (ik that’s how it works but I don’t want that)…
Any help would be appreciated
Color3.new() has a min and maximum value of [0,1] for each value of Red, Green, and Blue which would mean you’d need decimal values to achieve the colors you want. You should use Color3.fromRGB() to set the color of the frames.
You need to connect a MouseEntered() event on the bar instead of it’s holder frame.
by bar I mean the image in the ImageButton…script.Parent refers to the ImageButton.
And there is no issue with the colors, it changes before it enters the image(once it enters the UI, not the image inside it)
The event uses the UIElements size instead of the rendered image that it’s set to. The extra space around the bar is what’s causing this problem, it’s reacting correctly since your mouse is touching the ImageButton.
I created this image just for this post, I can crop and make it work fine but the problem is in the actual project, I have image of different shape like triangles, circle and many irregular shaped images…
so anything else ?
Irregular shapes will always have this problem, unless they can be flush with no extra space. Unless Roblox can make a feature to help it’s unfortunately the best we can do at the moment.
hmm… then ig we will have to go with this, all the images for this covers the complete screen and have BackgroundTransparency = 1(even for a small image) it’s gonna be a struggle for me now