Whenever a player with a certain name joins, a script must execute and give the player a weapon and place it in the Backpack. But since it is not put in 'StarterPack' because it is only for one player, the weapon will be gone when the player respawns. So it will have to be given both when the player joins and respawns.
I have a script that tests if the player joins but I don't know what I have to do for it to execute when the player respawns:
sword = game.ServerStorage.GreenSword
local swordCopy = sword:Clone()
while true do
local player = game.Players:FindFirstChild("Inscendio")
if player then
swordCopy.Parent = player.Backpack
return end
wait(1)
end
So I really need help with giving the weapon when the player respawns.

5 comments
Thanks for helping. It was useful but my problem for now is that how do I make it so that it also gives when the player respawns.
Too many comments, makes it hard to read.
CharacterAdded "Fired when a player's character spawns or respawns" so it will add the tool each time the respawn.
I will do that automatically Inscendio.
Oh okay thanks