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

Make the player unequip the tool he is holding, how? [closed]

Asked by 9 years ago

I cannot make the player unequip all of his tool he is holding, how can i make it unequipped?

for i, v in pairs(game.Players:GetPlayers()) do
        name = v.Name
        check = game.Workspace:FindFirstChild(name)
        if check then
            human = check:FindFirstChild("Humanoid")
            if human then
                -- part of the problem
                tools = check:GetChildren()
                if tools:IsA("Tool") then
                    tools:Destroy()
                end
            end
        end
    end

Locked by Redbullusa, MessorAdmin, and EzraNehemiah_TF2

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?

1 answer

Log in to vote
1
Answered by
Goulstem 8144 Badge of Merit Moderation Voter Administrator Community Moderator
9 years ago

There is a method of Humanoid called UnequipTools

More info here

0
Thanks, that worked, now i can continue on my project Endermanium 25 — 9y
Ad