Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Mouse cursor's position is not matched in Udim2?

Here is my code:

local mouse = game.Players.LocalPlayer:GetMouse()
local mouseUdim2 = UDim2.new(0,mouse.X,0,mouse.Y)
local Label = script.ImageLabel
Label.Parent = script.Parent
Label.Position = mouseUdim2

When I test it, the mouse's udim2 position is in the wrong place. It is at the bottom of the screen. What happened?

1 answer

✓ Accepted answer

dude it should work and YOU ACTUALLY HELPED me on what I was trying to do thank you here's me final code (its a drawing system):

while true do
local mouse = game.Players.LocalPlayer:GetMouse()
local mouseUdim2 = UDim2.new(0,mouse.X,0,mouse.Y)
local Label = script.Parent.ImageLabel
local Clone = Label:Clone()
Clone.Parent = script.Parent
Clone.Position = mouseUdim2
wait(0.001)
end

This discussion is preserved as it was. New answers, comments, and votes are closed.