I have a normal script in ServerScriptService: When a person joins they have a backpack on but when they die, they loose it. I want it to always stay on them after they die or whatever happens.
--This is front backpack
game.Players.PlayerAdded:connect( --When a player joins the game
function(plr)
plr.CharacterAdded:connect( --When his character spawns
function(char)
local tors = char:WaitForChild('Torso') --tors is the character's Torso
local backpack = workspace.Backpack:Clone() --Define backpack as a part
local weld = Instance.new('Weld',tors) --Create a new weld object inside tors
weld.Part0 = tors --A weld needs 2 parts to funciton, this is one of them
weld.Part1 = backpack.Part --This is the other one
weld.C0 = CFrame.new(0,0,1) --Offset it 1 stud backwards
backpack.Parent = char --Parent it to the character
end
)
end
)
