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

How do I make an Item that saves when you die?

Asked by 3 years ago

how do I make an Item doesn't get taken away when you die?

2 answers

Log in to vote
1
Answered by
jundell 106
3 years ago

Every player automatically has a StarterGear container. Any tool parented to here will automatically be given each time the player spawns.

0
So, TLDR; Tool.Parent = Player.StarterGear jundell 106 — 3y
0
would I use a local script? Batprime11 0 — 3y
0
you'd use serverscript and playeradded kegirosou 17 — 3y
0
please accept answer if it solved your problem :) jundell 106 — 3y
Ad
Log in to vote
0
Answered by 3 years ago

Here's a solution for your problem it is very simple :

-- Variables

local Tool = script.Parent
local Player = game.Players.LocalPlayer
local Backpack = Player:FindFirstChild("Backpack")

-- Creating a function that basically gives the player the tool :

function MoveScript()
    wait() -- Waiting a bit so it doesn't say "Something unexpected tried to change the parent"
    Tool.Parent = Backpack -- Setting the parent to the backpack
end

-- Calling The Function :

MoveScript()
0
Why? jundell 106 — 3y

Answer this question