I have a script
mouse = game.Players.LocalPlayer:GetMouse()
mouseHover = script.Parent.MouseEnter:connect(function()
script.Parent.Parent.Description.Visible = true
mouseMoved = script.Parent.MouseMoved:connect(function()
script.Parent.Parent.Description.Position = UDim2.new(0, mouse.X, 0, mouse.Y)
print(mouse.X, mouse.Y)
print(script.Parent.Parent.Description.Position)
end)
end)
script.Parent.MouseLeave:connect(function()
mouseMoved:disconnect()
script.Parent.Parent.Description.Position = UDim2.new(0, 0, 0, 0)
script.Parent.Parent.Description.Visible = false
print(mouse.X, mouse.Y)
end)
And when the image that is moving is in a space that allows it to utilize the entire screen, it works fine. However, when I put it into a smaller area, things are positioned differently. {0, 0, 0, 0}, for example, is not in the top left of the screen, but in the top left of my GUI. Due to this, my mouse position is within the entire screen, whereas my description label tries to find that place within a GUI to move to. How can I fix this? Thanks.
