So I am have been working on a custom mouse and here is the code.
--// Services \\--
local UserInputService = game:GetService("UserInputService")
--// Functions \\--
function Mouse:Start()
UserInputService.MouseIconEnabled = false
script.Parent.Visible = true
UserInputService.InputChanged:Connect(function(input)
if (input.UserInputType == Enum.UserInputType.MouseMovement) then
script.Parent.Position = UDim2.new(0, input.Position.X, 0, input.Position.Y)
end
end)
end
return Mouse
Is there a better way to do this? or even using a local script?