Hello i want to know what’s wrong in my code? i want change the mouse icon, how could i do that?
-- From a LocalScript:
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local mouse = player:GetMouse()
-- Setting the mouse icon
mouse.Icon = "rbxasset://SystemCursors/Wait"
No, your code is fine, the issue here seems to be with the referenced icon. It would not use an image label. The rbxasset://SystemCursors/Wait I believe only works with PluginMouse PluginMouse | Documentation - Roblox Creator Hub as mentioned here: Mouse | Documentation - Roblox Creator Hub : quoted directly, "When using a PluginMouse retrieved from Plugin:GetMouse, you can use the following icons similar to your system’s default cursors, such as hands, arrows, I-beams, etc. You can use these with GUI events like MouseEnter, MouseLeave, and MouseButton1Down to provide a consistent studio experience when interacting with certain kinds of GUI components. Note that these only work for studio plugins; they will not work for other Mouse objects. "
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local mouse = player:GetMouse()
-- Setting the mouse icon
mouse.Icon = "rbxassetid://6312174643"
Additionally, you’ll need to get the Image asset id. Try this:
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local mouse = player:GetMouse()
-- Setting the mouse icon
mouse.Icon = "rbxassetid://6312174616"
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local mouse = player:GetMouse()
-- Setting the mouse icon
mouse.Icon = "rbxassetid://6312174616"