Since you can’t change the cursor that pops up when hovering over a GUI object (TextButton, ImageButton) I’m trying to disable the cursor, and put an ImageLabel of the cursor on top of the cursor.
But, the cursor will not appear. The image is approved.
Code:
game:GetService('Players').LocalPlayer:WaitForChild('PlayerGui'):SetTopbarTransparency(1) -- this is sample code from Developer Hub
player = game.Players.LocalPlayer
mouse = player:GetMouse()
--[[
mouse.Icon = "http://www.roblox.com/asset/?id=4002059853"]]--
local userInputService = game:GetService("UserInputService")
userInputService.MouseIconEnabled = false
-- UserInputService code is from Roblox Developer Hub, too
local GUI = Instance.new("ScreenGui")
GUI.Name = "GUI"
GUI.Parent = player.PlayerGui
local Image = Instance.new("ImageLabel")
Image.Name = "Mouse"
Image.Size = UDim2.new(0, 15, 0, 25)
Image.Parent = GUI
Image.Image = "rbxassetid://4002059853"
while wait() do
Image.Position = UDim2.new(mouse.X, mouse.Y)
end
Thanks,
OldBo5.
