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

How do you make it so it saves your Tools in Backpack when you Reset? (SOLVED)

Asked by 3 years ago
Edited 3 years ago

I'm very confused. I wrote a script that sends the tool that you equipped TO the Backpack and StarterGear.

Isn't sending a tool to StarterGear enough to save your tools when you reset?

Here is the code I made:

local Kills = game.Players.LocalPlayer:WaitForChild("leaderstats").Kills
local Sword = game.Players.LocalPlayer.PlayerGui:WaitForChild("SwordShop").Sword
local Player = game.Players.LocalPlayer

script.Parent.MouseButton1Up:Connect(function()
    if Kills.Value > 0 or Kills.Value == 0 then
        local CurrentSword = Sword.Value
        if CurrentSword == "Dirt Sword" then
            print("Already Equipped")
        else
            local SwordClone = game.ReplicatedStorage.Swords["Dirt Sword"]:Clone()
            local SwordClone2 = game.ReplicatedStorage.Swords["Dirt Sword"]:Clone()
            SwordClone.Parent = game.Players.LocalPlayer.Backpack
            SwordClone2.Parent = game.Players.LocalPlayer.StarterGear
            wait()
            print("Equipped")
        end
        end
end)

1 answer

Log in to vote
0
Answered by 3 years ago

Solved

Ad

Answer this question