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

Why doesnt this ClickDetector script work?

local cd = game.Workspace.Rain.ClickDetector
cd.MouseClick:connect(function()
	local m = game.Players.LocalPlayer:GetMouse()
	m.Icon = "http://www.roblox.com/asset/?id=241876428"
end)

local sd = game.Workspace.Rain.ClickDetector
sd.MouseLeave:connect(function()
	local m = game.Players.LocalPlayer:GetMouse()
	m.Icon = "http://www.roblox.com/asset/?id=30656108"
end)

1 answer

✓ Accepted answer

What I think is wrong:

I think you need to fix 2 things.

  1. The first function has the sound playing on Click, while the other one is when the mouse is leaving. I would say change ".MouseClick" to ".MouseHoverEnter"

  2. The second function is telling it do something when a ".MouseLeave" occurs, but that doesn't exist. It should be ".MouseHoverLeave" like in the first one.

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