Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

What would be the opposite of Activated in scripting?

Asked by 10 years ago

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

Log in to vote
4
Answered by
samfun123 235 Moderation Voter
10 years ago

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!

Ad

Answer this question