Start typing to search packages!
hoversense
By @kaiwaii4ever
Roblox
MirroredHoverSense
A lightweight Roblox module for detecting mouse/touch/gamepad hover over tagged 3D instances, with click detection built in.
Hoverable instances are marked using a CollectionService tag ("Hoverable" by default), no manual raycasting or per-object setup required.
Features
- Detects hover via mouse, touch, and gamepad input
- Configurable hover range and tag name
- Fires distinct signals for hover start, hover end, continuous hover, and click
- Client-only. Safe to require on the server (returns a no-op table)
Installation
Add to your wally.toml:
[dependencies]
HoverSense = "kaiwaii4ever/hoversense@1.0.1"
Then run:
wally install
Usage
local HoverSense = require(path.to.HoeverSense)
local hover = HoverSense.new()
hover:Start()
hover.HoveringStarted:Connect(function(instance)
print("Started hovering:", instance:GetFullName())
end)
hover.HoveringEnded:Connect(function(instance)
print("Stopped hovering:", instance:GetFullName())
end)
hover.Clicked:Connect(function(instance)
print("Clicked while hovering:", instance:GetFullName())
end)
Tag any part or model you want to be hoverable with the "Hoverable" CollectionService tag (or whatever tag you configure — see below).
Custom configuration
local hover = HoverSense.new({
HoverRange = 15,
ContinuousHover = false,
Tag = "MyCustomTag",
})
| Option | Type | Default | Description |
|---|---|---|---|
HoverRange | number | 30 | Max distance (studs) from the player's character to register a hover |
ContinuousHover | boolean | true | If true, Hover fires every frame while hovering; if false, only on state change |
Tag | string | "Hoverable" | CollectionService tag used to mark hoverable instances |
Cleanup
hover:Destroy()
Stops listening, disconnects all internal connections, and destroys all signals. Don't reuse the instance after calling this.
API
Full API reference available in the document.
HoverSense.new(options?)— creates a new instancehover:Configure(options)— update config after creationhover:Start()— begin listening for hovershover:Stop()— stop listening and clear hover statehover:GetHovered()— returns the currently hovered instance, if anyhover:Destroy()— stops and cleans up all connections/signals
Signals
Hover— fires while hovering (every frame ifContinuousHover = true)HoveringStarted— fires once when a new instance starts being hoveredHoveringEnded— fires once when hover leaves an instanceClicked— fires when the currently hovered instance is clicked
Dependencies
Included via Wally dependencies already
License
MIT LICENSE
Package Details
Install command (Click to copy)
Version
1.0.3
License
MIT
Safe for commercial use
Automated license review — not legal advice.
