#GetMouse problem
22 messages · Page 1 of 1 (latest)
local P = game:GetService("Players")
local UIS = game:GetService("UserInputService")
local RS = game:GetService("RunService")
local plr = P.LocalPlayer
RS.RenderStepped:Connect(function()
local mousePos = UIS:GetMouseLocation()
print(mousePos.X, mousePos.Y)
end)
i forgot about that ngl
but i rewrote whole thing so lemme just
i made it slightly better
ok i can try fixes with that
😭😭😭
i tested this and it worked
local P = game:GetService("Players")
local UIS = game:GetService("UserInputService")
local RS = game:GetService("RunService")
local plr = P.LocalPlayer
local lastMousePos = nil
RS.RenderStepped:Connect(function()
local mousePos = UIS:GetMouseLocation()
if lastMousePos == nil or mousePos.X ~= lastMousePos.X or mousePos.Y ~= lastMousePos.Y then
print(mousePos.X, mousePos.Y)
lastMousePos = mousePos
end
end)
enjoy and cya