Hello, I’m trying to make a drag GUI element however the position of the mouseX and mouseY are not accurate. Let me show you what I mean:
Here is my script:
local function animateMouse()
local move = localPlayer.PlayerGui.ScreenGui.mobileElements.move
while actioning do
local mouse = localPlayer:GetMouse()
move.Position = UDim2.new(0, mouse.X, 0, mouse.Y)
task.wait()
end
end
as you can see, I am simply setting the position to Mouse.X and Mouse.Y.
Lets look at what this looks like:
as you can see, it does not accurately put it on the mouse.