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

ClickDetector is Can't Click with Tool?

i want to make click with tool but its not working

heres script

script.Parent.MouseClick:Connect(function(plr)
	if plr.Character.Parent == "Pickaxe" then
		print("clicked with pickaxe")
	end
end)

2 comments

0

Why did you write plr.Character.Parent? That will always be the workspace. Try and do plr.Character:FindFirstChild("Pickaxe"), as the tool your holding will always be the child of the character

0

cant click with tool how to solve this

1 answer

script.Parent.MouseClick:Connect(function(plr)
    if plr.Character:FindFirstChild("Pickaxe") then
        print("clicked with pickaxe")
    end
end)

Try this.

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