I need help with the player mouse
I’m trying to make the cursor change to a dot. It works in studio, but not in-game.
yes = now aiming, cursor should appear
no = no longer aiming, cursor texture goes to “”
mi = current mouse icon according to Mouse.Icon
ci = crosshair icon
Relevant code:
function MouseHandler()
UserInputService.MouseIconEnabled = true
UserInputService.MouseBehavior = Enum.MouseBehavior.Default
if Aiming then
Mouse.Icon = CrosshairIcon
print("\nyes\nmi:"..Mouse.Icon.."\nci:"..CrosshairIcon)
else
Mouse.Icon = ""
print("\nno\nmi:"..Mouse.Icon.."\nci:"..CrosshairIcon)
end
end
function Aim()
if Aiming then
Aiming = false
AnimationHandler("Stop","Aim")
AnimationHandler("Play","Carry")
else
Aiming = true
AnimationHandler("Stop","Carry")
AnimationHandler("Play","Aim")
end
MouseHandler()
end
Tool.Equipped:Connect(function()
Mouse = Player:GetMouse()
AnimationHandler("Stop","All")
AnimationHandler("Play","Carry")
MouseHandler()
end)
Tool.Unequipped:Connect(function()
AnimationHandler("Stop","All")
Aiming = false
MouseHandler()
end)
script.Destroying:Connect(function()
AnimationHandler("Stop","All")
Aiming = false
MouseHandler()
end)
I have already tried many things, such as adding Mouse.Icon = CrosshairIcon
and Mouse.Icon = ""
. I have also asked for help on RoDevs, to which, I still got no solutions.
studio cursor: image below (the dot)
game cursor: the default roblox cursor when you hover over a button or thing that you can click
Mouse.Icon (mi) shows the mouse has changed to the proper texture (ci), but it’s still the default tool cursor, even though the status of Mouse.Icon (mi) says otherwise
Any help would be greatly appreciated.