How do I create 'tooltip' TextLabel in Plugin

When I do this:

local HoverBox ="TextLabel")
HoverBox.Parent = Widget
HoverBox.Size =, 0, 0.25, 0)
HoverBox.Position =, 0, 0.25, 0)
HoverBox.Text = "Test"
HoverBox.Visible = true
HoverBox.ZIndex = 2

	HoverBox.Position =, plugin:GetMouse().X , 0, plugin:GetMouse().Y )

TextLabel is off like half of the screen, why does this happen, and how can I fix that?

1 Like

By default, Guis are positioned at their top-left corner. You can try changing its AnchorPoint to 0.5, 0.5, so that it’s positioned at the middle, or adjust its position like so:

local a = HoverBox.AbsoluteSize
HoverBox.Position =, plugin:GetMouse().X + a.X/2, 0, plugin:GetMouse().Y + a.Y/2)

What do you mean by off half of the screen, could you provide an image showcasing the issue?

This still did not fixed my issue, my TextLabel still is off the mouse position.

Try wrapping the:

HoverBox.Position =, plugin:GetMouse().X , 0, plugin:GetMouse().Y )

in a while loop for testing and test and see if that does anything differently

Try this:

local absSize = workspace.CurrentCamera.ViewportSize
local pos =, plugin:GetMouse().Y)
HoverBox.Position = / absSize.X, 0, pos.Y / absSize.Y, 0)

Same thing, nothing different. I am sure.

Bit different, but still did not solved issue.

I have a ui like this that works, the mouse is in the center of the frame 100 percent of the time

RS = game:GetService("RunService")
local Mouse = game.Players.LocalPlayer:GetMouse()
	Frame.Position = you put the scale factor you used divided by 2, Mouse.X, here you put the scale factor you used divided by 2, Mouse.Y)

This worked for me. Perhaps you are setting it up wrong?


Here is the code I'm using.
-- [[ Service Declarations ]] --

local runService = game:GetService("RunService")
local coreGUI = game:GetService("CoreGui")

-- [[ Variable Declarations ]] --

--// Camera

local camera = workspace.CurrentCamera

--// UI

local container ="ScreenGui")
local toolTipLabel ="TextLabel")

-- [[ Function Declarations ]] --

local function updateToolTip()
	local mousePosition = plugin:GetMouse()
	local x, y = mousePosition.X, mousePosition.Y
	toolTipLabel.Position =, x, 0, y)

-- [[ Init ]] --

	--// Setup UI Properties
	toolTipLabel.Size =, 0, 0.045, 0)
	toolTipLabel.BackgroundTransparency = 0
	toolTipLabel.Text = "I am Tooltip"
	toolTipLabel.Parent = container
	container.Parent = coreGUI

	--// Signal Connections

I am doing my ToolTip in Widget. Since I want to show user, description of each item in the list.

Perhaps you want to try placing your ToolTip in CoreGui? Also, perhaps when the mouse enters a widget the new mouse location is not recorded. (Just a hypothesis though)

1 Like

I’ve used you solution, It did work, but it was only showing in the range of screen, but not the plugin widget. It must be possible since Roblox could achieve Tooltip in Toolbox which is Widget.

Late response sorry. I was watching a video to find an answer to the “But it is only showing in the range of the screen”.

Around 7:05


Widgets can only detect the mouse location and all other user input typesinside the 3D viewport that you usually interact with during playtime and such. This means you will not be able to detect where the mouse is when a user is navigating the Explorer or Output window or any other widget.

Within that video there is also this:


You unfortunately will not be able to make your own ToolTips in the fashion you are trying to due to the limitations of widgets, sorry!

Also ROBLOX might use their own internal “ToolTip” methods not exposed to the Lua front-end.