So i have a gui button and i want to create a easter egg function by clicking and holding it for 2 second This is a script i currently have in my mind
script.Parent.MouseButton1Down:Connect(function() if script.Parent.MouseButton1Up then else wait(3) --Secret function end end)
Idk if that works. Is there a better way of doing this ? Thanks for reading, hope you could help :D
script.Parent.MouseButton1Down:Connect(function() local isholding = true script.Parent.MouseButton1Up:Connect(function() isholding = false end) wait() if isholding then --Secret Function end end)