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

Im trying to make the roblox mouse go invisible when you click a gui button. Its not working?

Asked by 3 years ago
local Button = script.Parent --where your button is located
local function Cancel()
    local UserInPutService = game:GetService("UserInputService")
    while true do
        wait(0)
        UserInPutService.MouseIconEnabled = false
    end
end
Button.MouseButton1Click:Conect(Cancel)

That's my script. This is the explorer: https://gyazo.com/8f991493ab72480552085e7dd0bfd24b The script works when I put it as a local script in the starter GUI. The problem is that it's not doing anything when you click. It's not a problem with making the mouse invisible.

Answer this question