game.Players.PlayerAdded:connect(function(player)
if player.Name==("Player1") then
KeyClone=game.ServerStorage.Key:Clone()
KeyClone.Parent=player.Backpack
end
end)
COMMUNITY QUESTION
what is wrong with this script?
2 answers
Not exactly sure. But you can find the answer by viewing the output while you're in test mode. The output tells you the area of the script that is incorrect and is an easy way to spot problems. Click the "View" button at the top and select its child "Output" to find what is wrong with your script.
I prefer spacing your ='s. KeyClone = game.ServerStorage.Key:Clone() should be at the top.
Then it should say...
game.Players.PlayerAdded:connect(function(player)
KeyClone = game.ServerStorage.Key:Clone()
if player.Name == ("Player1") then
KeyClone.Parent = player.Backpack
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.
