Summary of the Issue:
- When the player is holding a Tool, the Tool’s mouse input seems to override the functionality of
ClickDetector
, specificallyMouseHoverEnter
andMouseClick
. As a result, my BillboardGui (meant to show interactable buttons on hover) doesn’t appear while the Tool is equipped.
If there’s no reliable workaround for this issue with tools blocking ClickDetector interactions, I’m open to changing my approach entirely for example, using an inventory system. I’d really appreciate any advice on the best path forward!
Here’s what the system does:
- When hovering over a shelf part with a (
ClickDetector
), aBillboardGui
appears above it with interactable UI. - When the player has a Tool equipped, they can click “Place Vinyl” on the BillboardGui to drop the Tool onto the shelf.
What i have tried:
- I have looked around the forum for fixes and found some solutions that could work but i have not been lucky enough to get them to fix the problem.
Here is a video showing the problem:
Here is a small part of the code used:
clickDetector.MouseHoverEnter:Connect(function(plr)
local playerGui = plr:WaitForChild("PlayerGui")
local hoverUi = playerGui:WaitForChild("ShelfButtonsUI")
hoverUi.Adornee = spaces
hoverUi.Enabled = true
hoverUi.StudsOffset = Vector3.new(0, 2, 0)
end)
clickDetector.MouseHoverLeave:Connect(function(plr)
local playerGui = plr:WaitForChild("PlayerGui")
local hoverUi = playerGui:WaitForChild("ShelfButtonsUI")
hoverUi.Adornee = nil
hoverUi.Enabled = false
end)