ClickPoint is a simple module that re-implements ClickDetectors.
It will allow you to create “ClickPoints” that work with moving parts. This was a huge issue that I was running into while trying to build buses, trains, and other vehicles with first-person clickable objects.
I accomplished this by creating ClickDetectors that update on the render step on the client. During testing, I found this worked perfectly for my requirements.
There seemed to be a lack of a widely-available module that accomplishes this so I have decided to release this to the public.
ClickPoint Features
Can be dropped into existing ClickDetector code without much issue.
Supports button down/up events for both buttons on the mouse (left and right click).
Simple tooltip implementation available and functional out of the box.
Hover cursor can be changed during script execution.
Supports maximum activation distance (checks are performed on server-side to ensure that players outwith the activation range cannot trigger events on a ClickPoint.
Screenshots/Demonstrations
Tooltip Example
ClickPoint Demonstration (large GIF!)
Example Code
Example code can be found in the README of the GitHub repository for this project.
Feedback? Questions? Suggestions?
Feel free to leave your feedback, questions, or suggestions below - or raise an Issue on the GitHub repository! A lot of the optimizations and features may not have happened if it wasn't for the input of others'.
Also, if you've made any changes to the code you'd like to see everyone else use, please create a pull request with your changes.
I’m not sure what the issue is as I can’t see what you’ve put in the Script, however you don’t need to have a ClickDetector instance inside the part (ClickPoint sets itself up with Attributes).
Feel free to make an issue on GitHub and I may be able to assist you further there.
Wow, just Great Job and thank you very very much for this,
It helped me extremely with my Train Game.
Please don’t stop improving this if needed and I will also recommend this to many more people because this deserves way more attention.
Okay, so now it works when you hover over it the transparency of the Text gets slowly smaller, but now It to go higher when the Mouse left the Part.
I tried to make it with the Destroying Line but it didn’t work with the Tween.
The best thing you could do is fork my repository on GitHub and make your changes in your fork - this way I will be able to debug the code and see how you are doing it (perhaps once finished it can be merged into the main project).