I'm trying to clone a knife gear into a player's backpack using values for an inventory feature. Simple as that. This is testing things like this so that's why it seems so forced to happen:
game.Players.PlayerAdded:Connect(function(plr)
local KnifeValue = Instance.new("StringValue", plr)
wait()
KnifeValue.Value = game.ServerStorage.DefaultKnife.Name
if KnifeValue.Value == game.ServerStorage.DefaultKnife.Name then
game.ServerStorage.DefaultKnife:Clone().Parent = plr.Backpack
end
end)
When I do that it doesn't show up in my backpack nor in the explorer. If I change plr.Backpack to simply plr, it does show up in the explorer. Is there anything extra I have to add?

5 comments
Is code in LocalScript or server script???
server
try putting it in replicated storage
That didn't work Nickiel
Have you tried using waitforchild()? Like game.ServerStorage.DefaultKnife:Clone().Parent = plr:WaitForChild("Backpack")