Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Problem with my hopperbin code?

Basically, I want my tool to first start with changing the players mouse icon. But, i'm getting an error whenever I equip the hopperbin. Here is my error: Id is not a valid member of PlayerMouse

Help?

player = game.Players.LocalPlayer
tool = script.Parent

tool.Selected:connect(function(t)
	local mouse = player:GetMouse()
	mouse.Id = "http://www.roblox.com/asset/?id=138624641"
	
	t.Button1Down:connect(function()
		
	end)
end)

1 answer

✓ Accepted answer

The error is self explanatory. Mouse objects don't have an "Id" property.

player = game.Players.LocalPlayer
tool = script.Parent

tool.Selected:connect(function(t)
    local mouse = player:GetMouse()
    mouse.Icon = "http://www.roblox.com/asset/?id=138624641" --mouse.Icon, rather than mouse.Id

    t.Button1Down:connect(function()

    end)
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.