GUI hover descriptions

Hey! I know this topic has been posted once before, but nobody gave a clear answer + it was posted over a year ago.

So, I have an image button with a picture of a boat. I want to make it so that when I hover my mouse over the image button, a text label appears above the mouse with a description of the boat or whatever image I have.

I am quite new to scripting, but i’d quite like this feature in my game.

Thanks,
EmmettFrowns

1 Like

Okay, I’ll tell you how to do it in a few steps.

  1. This is what your explorer should look like:
    image

Make sure all the names are the same.

The display frame is the frame that you want to appear when you hover over the button, make sure it’s anchor point is 0.5, 0.5, and its position is 0, 0, 0, 0, and that it’s invisible.

Make sure the ScreenGui has IgnoreGUIInset set to true.

  1. Paste this into the local script:
--//Services
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")

--//Variables
local LocalPlayer = Players.LocalPlayer
local Mouse = LocalPlayer:GetMouse()
local ImageButton = script.Parent
local Display = ImageButton.Parent.Parent.Display

--//Controls
local isHovering = false

--//Functions
ImageButton.MouseEnter:Connect(function()
	isHovering = true
end)

ImageButton.MouseLeave:Connect(function()
	isHovering = false
end)

RunService.RenderStepped:Connect(function()
	Display.Position = UDim2.fromOffset(Mouse.X, Mouse.Y)
	Display.Visible = isHovering
end)
  1. You’re done, here’s a video for demonstration:
    InfoText Demonstration
6 Likes

Oh my god thank you so much, you’re so kind to have given that to me!

1 Like

No problem. If you have any more questions, feel free to ask.

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