So, i made this script, that was supose to turn of the mouse,when a button is pressed, but it isn't working and i have no idea why.
If the error is very obvious, im sorry, im new at scripting .p.
Anyways, here's the script:
local USI = game:GetService("UserInputService")
local button = game.StarterGui.Button
button.MouseButton1Click:connect(function()
USI.MouseIconEnabled = false
end
Ok bye.

2 comments
The button should be placed inside a ScreenGui object. You would also need to run code using a LocalScript since the GUI is client-sided. Do not index the button through game.StarterGui, but through script.Parent.Button if the LocalScript is inside the ScreenGui. In addition, use :Connect as :connect is deprecated.
Thx a lot!