The problem is I can’t find any way to switch between the states myself. I know I can change the mouse icon using the Icon property of the player’s mouse, but I also can’t find the rbxasset id of these cursors. Does anyone have an id/image of these cursors? Can I switch between these cursor states? Any help would be appreciated.
Try going into Roblox’s files then downloading the mouse icons then uploading them to Roblox. or just go into toolbox and try to find one because Roblox uses actual file icons not toolbox decals.
also, can perhaps show or tell me what you are trying to accomplish with this?
Unfortunately those are for plugins only, so they don’t work in-game. I was trying to save the images off of the website but they don’t have a transparent background
You can probably save each of those icons as an image (or custom ones) and upload them to Roblox as a decal. Just change the mouse icon to that decalId:
local Player = game:GetService("Players").LocalPlayer
local Mouse = Player:GetMouse()
local mouseIconId = 0
Mouse.Icon = "http://www.roblox.com/asset?id=" .. mouseIconId
no, i am using a raycast that changes the cursor based on what it is hovering over, i dont want to put a click detector inside all of the grabbable objects
The mouse’s behavior is handled by C++ code, its state is therefore handled outside of an environment available to user developers. If you want the mouse to exhibit custom states then you’ll need to code that behavior your self.
local Game = game
local Players = Game:GetService("Players")
local Player = Players.LocalPlayer
local Mouse = Player:GetMouse()
while true do
if Mouse.Target.Name == "Example" then --Name of an example part instance.
Mouse.Icon = "rbxassetid://0" --Change mouse's icon accordingly.
end
end
You can find transparent versions of various cursor icons in the following directory. C:\Users\<PCName>\AppData\Local\Roblox\Versions\version-<Version>\content\textures\Cursors