I'm trying to change the mouse icon in my game, but when I hover my mouse over a gui, it changes to a different one.
The code I use is:
local player = game.Players.LocalPlayer local mouse = player:GetMouse() mouse.Icon = 'http://www.roblox.com/asset/?id=5512887231'
Yes While the cursor hovers over a GuiButton, this property is temporarily ignored
A solution could be to create a custom mouse gui
Use this
local Player = game:GetService("Players").LocalPlayer local PlayerGui = Player:WaitForChild("PlayerGui") local RunService = game:GetService("RunService") local UserInput = game:GetService("UserInputService") local ScreenGui = Instance.new("ScreenGui",PlayerGui) local Cursor = Instance.new("ImageLabel",ScreenGui) ScreenGui.Enabled = true ScreenGui.ResetOnSpawn = false ScreenGui.IgnoreGuiInset = true ScreenGui.DisplayOrder = 9999 Cursor.Visible = true Cursor.Size = UDim2.fromOffset(50,50) --Mouse icon size Cursor.BackgroundTransparency = 1 Cursor.Image = "http://www.roblox.com/asset/?id=5512887231" --Assed ID Cursor.AnchorPoint = Vector2.new(0.5,0.5) --Change for the image position UserInput.MouseIconEnabled = false --Disable mouse icon RunService.RenderStepped:Connect(function() local MousePos = UserInput:GetMouseLocation() UserInput.MouseIconEnabled = false --just to be sure xd Cursor.Position = UDim2.fromOffset(MousePos.X,MousePos.Y) end)