I have a script that is supposed to change the mouse's icon when it is hovering over a certain part, let's call it Part1. Unfortunately, I don't know how I would be able to do this. Can anyone help me?
Here is what I have so far (it doesn't work by the way):
local mousee = game.Players.LocalPlayer:GetMouse() local t = mousee.Target local newd = coroutine.create(function() while wait() do if t.Name == "Part1" then mousee.Icon = "http://www.roblox.com/asset/?id=213374218" else mousee.Icon = "http://www.roblox.com/asset/?id=212856248" end end end) -- coroutine.resume(newd)
The script above always makes the mouse's icon "http://www.roblox.com/asset/?id=212856248," even if the mouse is hovering over Part1.
What you need to do is check the mouse.Target and compare it with your wanted part.
Also, if this is a tool you need to have an
local part = workspace.Part1 --Part to change upon --Assuming script.Parent is the tool script.Parent.Equipped:connect(function(mouse) coroutine.wrap(function() while wait(.5) do --.5 for reduction of client lag if mouse.Target == part then mouse.Icon = "http://www.roblox.com/asset/?id=213374218" else mouse.Icon = "http://www.roblox.com/asset/?id=212856248" end end end)() end)