I have a backpack script. It's suppose to make everything in the backpack be removed.
game.Workspace.Players.Username.Backpack:remove()
The script returns to false. Why so?
You do not want to remove the backpack itself, just the children in it.
for i,v in pairs(game.Workspace.Players.Username.Backpack:GetChildren()) do v:Destroy() end
Fixed your errors:
game.Players.PlayerNameHere.Backpack:ClearAllChildren()
But change PlayerNameHere to the players username
You tried to remove the backpack. Instead, remove its children.
children = game.Workspace.Players.Username.Backpack:GetChildren() for k, child in pairs(children) do if child:IsA('Part') and not child.Locked then child:Destroy() end end
Should be something like that. If it doesn't work, sorry about that. I got it off the wiki and modified it slightly.