So basically I have this mouse issue where if I’m using a custom mouse and another if you hover a click detector the mouse icons don’t change how do I fix this?
Also I’m mad at Roblox for not letting me upload the video showcasing the problem
So basically I have this mouse issue where if I’m using a custom mouse and another if you hover a click detector the mouse icons don’t change how do I fix this?
Also I’m mad at Roblox for not letting me upload the video showcasing the problem
I don’t really know who this is going to help but thanks!
You can setup a listener to the mouse image and if it changes, just change it back in a loop like this
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
mouse.Changed:Connect(function()
print("Mouse Icon Changed")
mouse.Icon = "rbxassetid://#####"
end)
Clickdetector has a property for this called CursorIcon.
Can you explain a bit more on what you mean by this?
Thats not recommended because:
mouse.changed
fires when any property of the mouse
is changed.
So if you Connect a function to mouse.changed
that changed the mouse its gonna run infinite times.
this is where debounce is useful
debounce = true
mouse.Changed:Connect(function()
if debounce then
debounce = not debounce
mouse.Icon = "rbxassetid://####"
debounce = not debounce
end
end)
Now it will only run when its not changed back.
-debounce means its gonna be reversed. so if db is true then -db is false
You can’t do this. If you want to reverse a boolean add a not statement infront of it.
ohhh it worked for me like a week ago… Strange… anyways okax ill note that
It was supposed to change to this image when I hovered the mouse on the object
You are using ClickDetectors right?
Yes, I am I’m using a click detector.
You can try using mouse.hit to see what the current mouse is hovering over and make it only change the mouse icon if you are a certain distance away
Is the clickdetector obstructed by anything at all?
no, it isn’t obstructed at all
Can you give the image ID of that custom cursor?
ID for the custom mouse: 14149455917