0

I'm trying to get the normal roblox cursor to customize it, using a local script, using luau. My code is this:

local inputServ = game:GetService("UserInputService");
local players = game:GetService("Players"); 
local player = Players.LocalPlayer;
local mouse = player:GetMouse();
local Image = "rbxassetid://12158273870"

    mouse.Move:Connect(function()
        inputServ.MouseIconEnabled = false; 'invisible')
        Image.Position = UDim2.new(0, Mouse.X, 0, Mouse.Y);
    end)

When i run the code on roblox studio, It shows the normal mouse, which is not what i want.

I tried getting it by using a variable having a rbxassetid on value: 12158273870. And it resulted in the same normal mouse.

1 Answers1

0

Make sure your script runs in Client RunContext, and then below would suffice (assuming your asset id is correct):

local mouse = game.Players.LocalPlayer:GetMouse()
local image = "rbxassetid://12158273870"
mouse.Icon = image
draganstankovic
  • 5,382
  • 1
  • 27
  • 33