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

How can I make a Equip and UnEquip script?

Asked by 10 years ago

When you Equip a Tool/Hopperbin it'll print something like Equiped weapon, and when UnEquiped it'll print UnEquiped Weapon, I wish I explain a bit more, but thats the Best I could think of what to explain about my question.

2 answers

Log in to vote
1
Answered by 10 years ago
script.Parent.Equipped:connect(function()
print("The tool was Equipped!")
end)

script.Parent.Unequipped:connect(function()
print("The tool was unequipped!")
end)

Or for hopperbin

script.Parent.Selected:connect(function()
print("The hopperbin has been Selected")
end)

script.Parent.Deselected:connect(function()
print("The hopperbin has been Deselected")
end)

Put this in a tool or hopperbin! Selected for hopperbin!

0
Hope I helped! fireboltofdeath 635 — 10y
0
NOTE: If you want it to do hopperbin the correct term is Selected and Deselected this is for a tool and a tool only. fireboltofdeath 635 — 10y
0
Somehow the script isn't working, when I tried it it said 'Unequipped is not a valid member of Backpack'? TheeDeathCaster 2368 — 10y
0
Oh hold on fireboltofdeath 635 — 10y
View all comments (4 more)
0
Don't put the script in Backpack put it in tool! Or hopperbin! fireboltofdeath 635 — 10y
0
Oh. I am sorry for some reason it won't work :( fireboltofdeath 635 — 10y
0
Its alright man, I'll +1 you anyway. ;) TheeDeathCaster 2368 — 10y
0
Thank you! fireboltofdeath 635 — 10y
Ad
Log in to vote
-1
Answered by 10 years ago

Equipped event : http://wiki.roblox.com/index.php?title=Equipped_(Event)/mouse

Unequipped event : http://wiki.roblox.com/index.php?title=Unequipped_(Event)

Hope this helped, if you need an example, I can provide.

0
I guess you need to give me an example. :P TheeDeathCaster 2368 — 10y
0
Please dont link to sources( you can) but you must provide an example please... RM0d 305 — 10y

Answer this question