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

HopperBin doesn't get removed in player's inventory?

Asked by 2 years ago

I was trying to remove the HopperBin in user's inventory using the following script:

game.Players.PlayerAdded:Connect(function(player)
    for i,v in pairs(player.Backpack:GetChildren())
        if v:IsA("HopperBin") then
            v:Destroy()
        end
    end
end)

Instead of removing, it does nothing. Any help would be great!

0
HopperBins created on the client won't appear on the server. Even if the exploiter did have a HopperBin, it wouldn't be deleted. sngnn 274 — 2y

1 answer

Log in to vote
1
Answered by 2 years ago

1st of all, you should try it when the Character is added. Tools and such do not go straight to the backpack, it waits until the character is added and then adds tools to the backpack.

2nd of all, I wouldn't use HopperBins to begin with, as they're deprecated (use tools).

0
Thanks, just to check for HopperBins if they're from exploits. GamerLighting23233 63 — 2y
Ad

Answer this question