So in my game I want to implement custom cursors using UserInputService and LocalPlayer:GetMouse() to set the custom cursor.
local Mouse = game.Players.LocalPlayer:GetMouse()
-- 9 = Dot
Mouse.Icon = "rbxassetid://6872579222"
local function onMouseHoverEnter()
Mouse.Icon = "rbxassetid://129875024"
print("Hover!")
end
local function onMouseHoverLeave()
Mouse.Icon = "rbxassetid://6872579222"
print("NoHover!")
end
for _, child in pairs(game.Workspace:GetDescendants()) do
if child:IsA("ClickDetector") then
child.MouseHoverEnter:Connect(onMouseHoverEnter)
child.MouseHoverLeave:Connect(onMouseHoverLeave)
end
end
I tested this in Roblox studio, and it worked perfectly fine, and the custom cursor was showing up properly. I published the changes, committed the scripts and went to check on an actual game test in the Roblox website and it didn’t work. The mouse didn’t change, and it was locked on default Roblox button hover icon. I tried to hover over some of the click detectors and it did somewhat work, only problem was that it never changed the icon back and was stuck on the custom hover icon (the Mouse Leave and Mouse Enter functions were being triggered properly indicated by the print statements). I moved onto the Microsoft Roblox App, and it worked perfectly fine. I tried to disable the script and added a new script:
local UIS = game:GetService("UserInputService")
UIS.MouseIconEnabled = true
while true do
UIS.MouseIcon = "rbxassetid://6872579222"
wait(0.05)
end
This worked fine on both the Microsoft App and Roblox Studio but not on the Roblox Website App. Is there a reason why this might be happening?