alright, well thanks for the help!
Mark it as a solution if you can please.
The solution was that the way I was changing the mouse’s icon was incorrect.
I was doing just the ID code and not
'rbxassetid://9126971632'
using a loop to change the mouse’s icon did nothing and i did not include it in my final code.
Thanks anyways I appreciate it a lot I just want to guide others to the correct answer.
local Game = game
local Players = Game:GetService("Players")
local Player = Players.LocalPlayer
local Mouse = Player:GetMouse()
Mouse.Icon = "rbxassetid://9126971632"
Is all you need to do.
The issue is not that I dont know how to change the mouse Icon. The issue is that the mouse Icon changes automatically when hovering over a button.
lets say you change the mouse Icon to a scope and it works. If you hover over a textbutton then it changes it to the default mouse Icon.
The end solution was the disable the “Active” property of the textbutton. This stopped that from happening. The only issue is that when they click the button it changes it back for a second then back to the icon you changed it to.
it changing to default mouse for a second isnt that bad so this issue was marked as solutioned
The workaround would be to use an ‘ImageLabel’ that tracks the mouse’s location each frame.
local Enumeration = Enum
local Game = game
local Script = script
local RunService = Game:GetService("RunService")
local UserInputService = Game:GetService("UserInputService")
local Gui = Script.Parent
local ImageLabel = Gui:WaitForChild("ImageLabel") --ImageLabel's AnchorPoint should be 'Vector2.new(0.5, 0.5)'.
local function OnRenderStep()
local MouseLocation = UserInputService:GetMouseLocation()
ImageLabel.Position = UDim2.new(0, MouseLocation.X, 0, MouseLocation.Y - 36) --36 to account for the GuiInset.
end
RunService.RenderStepped:Connect(OnRenderStep)
UserInputService.MouseIconEnabled = false
This solution works but is bad for optomization
In this case any performance impact would be insignificant since everything is handled by the client anyway.