Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

What would be the opposite of Activated in scripting?

Hey there! I was wondering, I have a gun script that fires the gun when activated, like so:

script.Parent.Activated:connect(onActivated)

This then, as you can see, launches my onActivated script.

What I would like to know is what I could do to call the opposite of this. Basically, activated is when someone clicks to shoot the gun.

Would using the MouseButton1Down event be better than this? Or would that even work?

If anything is confusing, ask and I'll update this to better help you help me. Thanks in advance!

1 answer

✓ Accepted answer

The event when a player lets go of the MouseButton1 is the Deactivated event.

In your case

script.Parent.Deactivated:connect(onDeactivated)

or whatever function you want to run when the player lets go of MouseButton1.

If you have any questions, concerns or just need some help with this PM me on ROBLOX!

This discussion is preserved as it was. New answers, comments, and votes are closed.