script.Parent.MouseButton1Click:Connect(function(plr)
script.Parent.Parent.Parent.frame2.Visible = false
script.Parent.Parent.Parent.frame3.Visible = true
wait(1)
script.Parent.Parent.Parent.frame3.changeLabel.Text = "Verifying Details..."
wait(1.5)
script.Parent.Parent.Parent.frame3.changeLabel.Text = "Printing Card..."
local tool = game.Lighting.Passport
local clone = tool:Clone()
clone.Parent = plr.Backpack
wait(0.5)
script.Parent.Parent.Parent.frame3.changeLabel.Text = "Check-In Complete!"
end)
This script is trying to give a tool to a player, but I don't seem to understand any of it as I get the error: Players.Avia_Adaam.PlayerGui.ScreenGui.frame2.TextButton.Script:10: attempt to index local 'plr' (a nil value), I've tried everything and nothing works.

1 comment
https://gyazo.com/518bf97c530b3402b47a845ae959c771