How to get scale position from mouse's offset position

this just gives the mouse’s offset x and y positions. how would i convert it to scale? thanks for any help🫡

local mouse = game.Players.LocalPlayer:GetMouse()
local x = mouse.X
local y = mouse.Y
1 Like

thank you @dthecoolest for the links. based off of them i got this and this can give the scale position of a player’s mouse

local mouse = game.Players.LocalPlayer:GetMouse()
local viewSize = game.Workspace.CurrentCamera.ViewportSize
local x = mouse.X/viewSize.X -- will give you scale pos of X
local y = mouse.Y/viewSize.Y -- will give you scale pos of Y
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.