ClickDetector hover effect

print(“Hello developers!”)
Currently, Roblox ClickDetectors are mostly seen as obsolete in favour of the newer addition to Roblox - ProximityPropmts. That’s no surprise - ProximityPrompts offer more customisation and more flexibility in scripts.

Imagine a ClickDetector reinvented.

My idea of a click detector is that it should have a built in choice to highlight the object that it is parented to and this is what inspired me to create this script. Not only does it add a highlight to the object your mouse is hovering over it also lets you add an ActionText! Simply add a custom property of string to the ClickDetector called ActionText and input the text you wish to be displayed.

If you’d like to play around with this or you want to include it in your game, here’s the script: ClickDetector Hover Effect - Roblox

Place the script under StarterPlayerScripts - it is a LocalScript

Have fun!


This is great! I can see this being used in different types of games!

I love this, although I feel sad for mobile users.

Oh my god, I absolutely love this. Now I’m gonna script it myself, don’t worry you’ll get credit.

Amazing! Can bring alot of life to a game. One quick addition i did is adding this into the top of the script:

local localplayer = game.Players.LocalPlayer

	local HitPos = Mouse.Hit.Position
	if Mouse.Target:FindFirstChildWhichIsA("ClickDetector") and localplayer:DistanceFromCharacter(HitPos) <= Mouse.Target:FindFirstChildWhichIsA("ClickDetector").MaxActivationDistance then

Makes the outline only appear when the player is within the MaxActivationDistance of the clickdetector!


apologies for the necro post, but the code causes this error to flood the output entirely non-stop if the mouse isn’t hitting a part

if it looks into the sky for example, with no part blocking it, it’ll flood this error. It stops once it hits a part at all

I should’ve put it in a pcall() and do some error handling, how it originated is that I was bored and had no idea what to make so I speedran a module, I’ll fix that

1 Like

How i can change this mouse button to the normal icon?

ClickDetectors have a property inside of them by default