I’m trying to make it so whenever you hover over a textbutton, a textlabel becomes visible and follows your mouse while the mouse is over the textbutton. It’s working, but for some reason it is offset by a lot.
Here’s the code:
local mouse = game.Players.LocalPlayer:GetMouse()
local rs = game:GetService("RunService")
local entered = false
script.Parent.MouseEnter:Connect(function()
entered = true
script.Parent.InfoFrame.Visible = true
rs.RenderStepped:Connect(function()
if entered == true then
script.Parent.InfoFrame.Position = UDim2.new(0, mouse.X, 0, mouse.Y)
end
end)
end)
script.Parent.MouseLeave:Connect(function()
entered = false
script.Parent.InfoFrame.Visible = false
end)