This is just a script inside of workspace. It's working weirdly and I don't know if I did something and I don't notice a simple error or what, but my script is suppose to give a certain player a tool when they enter and if they were to die, they'd get said tool again.
Here's the script:
A = "alphawolvess" L = "ThisPersonIsASecretSooooyea" -- Not what's actually there, but I wont give out his name in case he prefers not to have it out. Test = "Player" game.Players.PlayerAdded:connect(function(Plr) Plr.CharacterAdded:connect(function(Char) if Char.Name == L or Char.Name == A or Char.Name == Test then print("Giving") local Copy = game.ServerStorage:FindFirstChild("RedKatana") Copy.Parent = Plr.Backpack else print("Not Giving") end end) end)
Yes, I know I can use a generic loop and store the names in a Table. I also know I can use string.lower but the spelling for players is correct. Also, I do know that Player changes from Player1 to Player for some reason, currently (for me) it's Player and I change that if needed.
I do get an error about Local Copy being nil
I don't know if it's the error or not, but it seems you never actually clone the sword. You index it and attempt to move it, but never physically clone it.
You need to actually clone the katana on line 10.
Copy:Clone().Parent = Plr.Backpack
Also you can just use Plr.Name