Is it possible to shorten the time requirement of the touchlongpress function?

hi to anyone reading this, ive tried making a button that does something when its held down and came across the touchlongpress function. however, i find the time requirement for this function to trigger is way too long especially since im trying to make a fast paced game.

is there any way to reudce the time or any other alternatives (for mobile please!)?

UserInputState | Documentation - Roblox Creator Hub
Can you just check the time between the Touch Begin and Touch End states?

something like:
Get Touch Begin input
Start counting

Get Touch End input
Check to see if the End time is x number of seconds after the input. If it is the time you want then perform the code you need to. If it’s not long enough don’t perform the code.

1 Like

oh thank you, i didnt think about this :sob:. ill try it now and let you know if im sucessful.

thank you, it ended up working!

1 Like

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