Is there any possible solution to the tool button

Hello devs,

So below is a video to what i have a problem to and ill state what i want to achieve

so when i hover over the ammo a highlight is visible and when i don’t it is not visible.
But when i equip the Uzi tool and i hover over the ammo the highlight is not visible.

Is there any possible solution to this?

any feedback is appreciated.

MouseHover and MouseClick (or whatever they are called) events don’t fire under a ClickDetector whilst a tool is equipped (from personal experience)

so is there anyway i could bypass this?

You could try to use Mouse.Target and detect whenever it is hovering over the BasePart

2 Likes

I don’t think you can.
Try what tms said above

1 Like

I wouldn’t really recommend you use Mouse, considering its old, and has been superceded by UserInputService which contains a lot more support for other devices, and Input Detection (This is assuming it will be on Multiple Devices)

But for a Mouse Based solution, you would be looking at Mouse.Hit, as it returns the Object that the Mouse is pointing at, you can use CollectionService to tag the objects, an check if they had been tagged with a specific tag.

if Hit:HasTag("Example") then
    -- do something
end

Edit: Hit returns a CFrame, Target Returns an Instance

2 Likes

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