How to make ImageLabel visible when hovering over TextButton?

Yeah basically I’m going to learn how to script so I’m probably going to refer to the developer forums for help… lol

Anyway, I want to use an ImageLabel on a TextButton and I want to make the ImageLabel visible when hovering over the TextButton and invisible when I’m not hovering over the TextButton. Can someone give me an explanation on the process of coding something like this?

Also… does anyone have any advice on where else I can look for coding advice? Any advice for learning coding? Thanks for being supportive…

First of all, for advice on scripting, I like to use the roblox documentation for learning about certain things, as well as the developer forum! Roblox Creator Documentation

An example: The other day, I was learning about :Lerp Which allows an Object to move a certain amount of % from position 1 to position 2. I started by looking on the Documentation page, and found this: CFrame:Lerp Docs. , but for me that didn’t contain enough information for me to use it, so I used these posts: How to Use Lerp post, Lerp isn’t executing properly Post and a couple others to fill in and be able to use it myself. Though this is an example.

Anyways back to what this topic is about. You can do this by something like this:

local textbutton:TextButton = nil -- replace 'nil' with the pathway to the button
local textlabel:TextLabel = nil -- replace 'nil' with the pathway to the label

	if textlabel.Visible == false then
		textlabel.Visible = true


	if textlabel.Visible == true then
		textlabel.Visible = false


@OfficialPogCat thank you for responding to my post. I’ll make your post the solution. Also thank you for the advice… now I understand how to code something like this.

1 Like

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