I’m attempting to change the Mouse.Icon to a different decal, however it doesn’t seem to want to work.
I’ve made sure the mouse instance is detected in the variable, I also decided to try printing the mouse icons assetid after trying to change it to the new icon, and it did print the decal that I am trying to set it as, however the new icon does not appear on the players screen.
The script is a local script and it’s in the StarterPlayerScripts folder.
Here’s the script (note: it also contains the setting of the running animations sound also)
local plr = game.Players.LocalPlayer
local mouse = plr:GetMouse()
plr.CharacterAdded:Connect(function(char)
local hum = char:WaitForChild("Humanoid")
local hrp = hum.Parent.HumanoidRootPart
local run = hrp.Running
local dist = Instance.new("ReverbSoundEffect")
dist.Parent = run
run.Volume = 0.3
run.PlaybackSpeed = 0.78
while wait() do
run.SoundId = 'rbxassetid://510934212'
mouse.Icon = 'rbxassetid://5438996052'
end
end)
print(mouse.Icon)
local UserInputService = game:GetService("UserInputService")
local plr = game.Players.LocalPlayer
local mouse = plr:GetMouse()
UserInputService.MouseIconEnabled = true
plr.CharacterAdded:Connect(function(char)
local hum = char:WaitForChild("Humanoid")
local hrp = hum.Parent.HumanoidRootPart
local run = hrp.Running
local dist = Instance.new("ReverbSoundEffect")
dist.Parent = run
run.Volume = 0.3
run.PlaybackSpeed = 0.78
while wait() do
run.SoundId = 'rbxassetid://510934212'
mouse.Icon = 'rbxassetid://5438996052'
end
end)
print(mouse.Icon)
I just tried putting it into studio, however it still doesn’t change the icon, but thank you for trying though
I’m assuming it’s probably something to do with how the mouse cursor changes when it hovers over a GUI, however it still doesn’t change when I change the default icon in one of the playermodules
you need to change this to use the image id not the decal id
'rbxassetid://5438996031' – this is your image id to get this you can just take the decal id you have and post it into an decal or imagelabel in studio and it will change the id into the image id
The while loop was just put in place to make sure the things I set don’t get changed back which sometimes happens or has happened, basically it’s just temporary to try to limit the amount of things that could be causing it not to set the mouse icon
Yeah I just put it there just in case roblox was doing something shady that I didn’t know about lol, I removed it now though.
Thanks for your help again