Hey guys, is there a way to change all types of mouse icons, like the normal one is .Icon but what about the others? Like when you hover over a button.
The mouse object only has 1 ‘icon’ property, it is changed by the internal engine in response to certain events e.g; hovering over a button.
So basically I can’t do it? limit
Yes, changing the mouse icon will change all mouse icons to your image. You cannot change them individually.
It won’t, if you hover over a button it will turn into the default one.
Maybe this could help solve your issue: When I hover my cursor over a button with a custom cursor it goes away
How does the anchor point do anything lol
You can, you just need to code the custom behavior yourself.
local Game = game
local Script = script
local Players = Game:GetService("Players")
local Player = Players.LocalPlayer
local Mouse = Player:GetMouse()
local GuiObject = Script.Parent
local CustomIcon = 0 --Change this to the icon's image ID.
local function OnMouseEnter()
Mouse.Icon = "rbxassetid://"..CustomIcon
end
local function OnMouseLeave()
Mouse.Icon = "" --Assigning an empty string value resets the mouse back to its default icon.
end
GuiObject.MouseEnter:Connect(OnMouseEnter)
GuiObject.MouseLeave:Connect(OnMouseLeave)
MouseEnter and MouseLeave is unreliable, also default mouse will take over
Do you know how I can make the mouse stay on top of the roblox gui? Like the chat button and roblox button?
The script I provided is working fine on my end.
also default mouse will take over
Are you perhaps getting confused between the pre-existing mouse and a custom mouse?
A completely custom mouse will require you to program all of its behaviors.
It won’t ALWAYS work as it is unreliable
I’ve never encountered any issues with it.
https://developer.roblox.com/en-us/api-reference/function/BasePlayerGui/GetGuiObjectsAtPosition
You’re welcome to perform the above method every frame within a ‘RenderStepped’ loop if you feel inclined to do so.
You’d get the mouse cursor’s position from the following method.
https://developer.roblox.com/en-us/api-reference/function/UserInputService/GetMouseLocation
Do you know how I can make the mouse stay on top of the roblox gui? Like the chat button and roblox button?
- What about this question?
Can you demonstrate what you mean?