ClickDetector Hover while tool equipped

1. What I’m trying to achieve?
I want to make the player able to click on a ClickDetector while the player is equipping a tool.

2. What is the issue?
The mouse does not show the MouseHoverEnter when the tool is equipped, so I cannot click the ClickDetector.

Are you able to show any scripts for this?

Also, this topic should be categorised under #help-and-feedback:scripting-support .

This is the script for the ClickDetector that gives the player a tool. This is not related to the thing I’m achieving, and not the ClickDetector that I want it to have ClickDetector Hover.

local ToolNames = {"Battery"}
local Storage = game:GetService("ServerStorage")

local Part = script.Parent
local ClickDetector = Part:WaitForChild("ClickDetector")

ClickDetector.MouseClick:connect(function(Player)
	local model = game.Workspace.Battery

	script.Parent.Script.Disabled = true
	script.Parent.ClickDetector.MaxActivationDistance = 0

	if Player and Player.Character then
		local Backpack = Player:WaitForChild("Backpack")
		for i = 1, #ToolNames do
			local Tool = Storage:FindFirstChild(ToolNames[i])
			if Tool then
				Tool:clone().Parent = Backpack
	
	
		for i, model in ipairs(model:GetDescendants()) do
			if model:IsA("BasePart") then
				model.Transparency = 1
						end
					end
				end
				end
		end

	
end)

I’m certain that you can’t use ClickDetectors and Tools together. Perhaps try replacing the ClickDetector with a ProximityPrompt?

1 Like

I see, thanks for the suggestion!

[Please expand this reply to see the full message].

Hey @Calmityy ! Did my previous reply help?

If it did, do make sure to mark it as the Solution of the topic! This would help other Developers find answers more easily.

If not, please notify me, and I’ll try my best to see if there’s an alternative to my previous reply!

Yup, I used ProximityPrompt instead and works perfectly fine.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.