Hi Other Developers,
I’ve been running into this problem where I don’t know how to get the Player’s Mouse Position in Udim2
Here is my code:
local PlayerMouse = game.Players.LocalPlayer:GetMouse() --// mouse
local function spawnParticles()
ParticleInstance.Position = Mouse.Position -- here is the issue
end
You can use Mouse.X, and Mouse.Y (represented by pixels from the top-left corner.)
UDIM represents UI measurments in both scale and pixels of a screen (or parent element),
If you… need? the position in scale units for some reason you can always just divide the position on x or y by the appropriate corresponding axis of the screen