On click release???

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Ceekay

New Member
Nov 16, 2024
5
0
1
Is there a way to have a thing that does a thing whenever right click is released like
Code:
on right click:
    message "start" to player
    right click released:
        message "end" to player
So is there something like "Right click released"
 
I don't think this is even possible with Skript. This is very interesting, though. Unfortunately, I couldn't really find anything.
 
there's only one way that i know of - which can be laggy
you can set a variable to the current time when a player right-clicks
you can use a periodical to compare the last clicked time to the current clicked time - if it's greater than two ticks, run your code and delete the timestamp
if you're fine with a bit of latency, you can go for a longer periodical for slightly better server performance (adjust the timestamp length condition accordingly)