Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Removing Mouse Cursor?

Asked by 8 years ago

I need help removing the cursor of the Roblox mouse to replace it with another... Help?

2 answers

Log in to vote
1
Answered by
DataStore 530 Moderation Voter
8 years ago

The easiest way to do this is by getting the player's mouse (using a LocalScript and GetMouse) and then changing the Icon property.

local Mouse = game.Players.LocalPlayer:GetMouse()
Mouse.Icon = ""

http://wiki.roblox.com/index.php?title=Mouse_appearance_tutorial#Set_mouse_icon

0
This link was very helpful thanks! Vedster 5 — 8y
Ad
Log in to vote
0
Answered by 8 years ago
local Tool = script.Parent;

enabled = true
function onButton1Down(mouse)
    if not enabled then
        return
    end

    enabled = true
    mouse.Icon = "http://www.roblox.com/asset/?id=2966012"

end


function onButton1Up(mouse)
enabled = false
Tool.Enabled = false
mouse.Icon = "http://www.roblox.com/asset/?id=2966012"

wait(.8)

mouse.Icon = "http://www.roblox.com/asset/?id=2966012"
enabled = true
Tool.Enabled = true
end

function onEquippedLocal(mouse)

    if mouse == nil then
        print("Mouse not found")
        return 
    end

    mouse.Icon = "http://www.roblox.com/asset/?id=2966012"
    mouse.Button1Down:connect(function() onButton1Down(mouse) end)  
    mouse.Button1Up:connect(function() onButton1Up(mouse)end)
end


Tool.Equipped:connect(onEquippedLocal)

Answer this question