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

Is it possible to activate a script with a tool?

I am not going to request anything, but is it possible for a script to activate after a player puts away a tool if so, can you provide the link for this function

5 comments

0

This is requesting something. Show what you tried to look up and tried to use.

0

I don't mean to request anything, I could't find a lot in the dev forum at first

0

You should search with a search engine instead of just a single specific site

0

Ill keep that in mind, but how would i search?

0

you search it?

1 answer

✓ Accepted answer

Bind your script with an Equipped event. Heres an example of how to print hello world when you equip a tool.

locationoftool.Equipped:Connect(function()
    print("Hello world!")
end)

To run code after its unequipped then just bind it to an Unequipped event. Heres an example of how to print bye world when you unequip a tool.

locationoftool.Unequipped:Connect(function()
    print("Bye world?")
end)

4 comments

0

Thank you this is helpful, but what about when you put away the tool not equip it

0

Nvm thank you very much

0

Activated when you click, and Deactivated is after you click.

0

I never said activated and deactivated? i said equipped and unequipped

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