So i tried to make a script where it would give me a keycard when I spawn, but it gives me an error what did i do wrong?
local players = {"CelticFury600"}
local gear = game.ServerStorage.Keycard
game.Players.PlayerAdded:connect(function(plr)
plr.CharacterAdded:connect(function(chr)
for i = 1, #players do
if players[i] == plr.Name then
gear:Clone().Parent = plr:WaitForChild("Backpack")
end
end
end)

1 comment
Can you please post the error in the output? That can help me come up with a solution.