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

When you click a image/text button unequip all tools?

Asked by
tykoone -8
7 years ago
Edited 7 years ago

when you click image/text button you unequip all tools from backpack... not destroy, clear or remove

0
Tools in the backpack are not equiped? all you would do is use the function :Destroy() or ClaerAllChildren() User#5423 17 — 7y
0
Also shouldn't this be classified as 'Not Constructive', since you don't need help with fixing an error but instead you're just asking for a script? RiskoZoSlovenska 378 — 7y
0
no i need help with to UNEQUIP tykoone -8 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago

Make the TextButton, add a LocalScript to it, and write the following text into the script:

local textbutton = script.Parent --The TextButton
local player = game.Players.LocalPlayer --The player

textButton.MouseButton1Down:connect(function() --AKA 'When button clicked'
    player.Backpack:ClearAllChildren() --Clears the player's backpack
end)
0
sry you helped with deleting gears but i needed help with unequip sry but you helped tykoone -8 — 7y
Ad

Answer this question