You can write your topic however you want, but you need to answer these questions:
Currently, I’m trying to make a kinda text hover effect, so when you hover over a textbutton a textlabel appears that follows your mouse.
But, whenever I try and create the Y position of the textlabel just isnt correct.
I’ve tried looking on google at the devforum, but found nothing.
Heres my code that I have currently:
local TextButton = script.Parent.Parent
local TextLabel = script.Parent
local Mouse = game.Players.LocalPlayer:GetMouse()
----| Functions |----
function UpdatePosition()
TextLabel.Visible = true
TextLabel.Position = UDim2.new(0, Mouse.X, 0, Mouse.Y)
end
function Remove()
TextLabel.Visible = false
end
----| Functioning |----
TextButton.MouseMoved:Connect(UpdatePosition)
TextButton.MouseLeave:Connect(Remove)
textbutton btw is a scrollingframe if that changed anything.
You probably should have provided this detail at the start. The ‘TextButton’ object’s position is going to be influenced by the position of the ‘ScrollingFrame’ by virtue of the former being a child of the latter.
Instead of ‘250’ incorporate ScrollingFrame.AbsolutePosition.Y into your code.