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

Whenever you reset, you get your tools even though startergear is empty?

Asked by 3 years ago

I made a script that equips your sword for you, and whenever you equip a new sword it clears all children from your backpack, and startergear and replaces your backpack and startergear with the new sword.

Here is part of the script: (I already defined Backpack and Startergear and Sword.)

                        wait()
                        Backpack:ClearAllChildren()
                        StarterGear:ClearAllChildren()
                        local e = game.Workspace[LocalPlayer.Name]:WaitForChild(Sword.Value, 0.01)
                        if e then
                            e:Destroy()
                        end
                        wait()
                        SwordEquip:FireServer("Diamond Sword")
                        wait()

If a sword was in StarterGear and was removed, it still gives you the sword on death.

Answer this question