I keep getting this error : Players.SpoostyGuy.PlayerGui.ScreenGui.Shop.ImageButton.Script:5: bad argument #2 (string expected, got nil)
my code:
script.Parent.MouseButton1Click:Connect(function(plr)
local playerTouch = game.Players[plr]
if playerTouch.leaderstats.Coins.Value >= 60 then
print("Bought!")
playerTouch.leaderstats.Coins.Value = playerTouch.leaderstats.Coins.Value -60
else
print("Not ENought Money!!")
end
end)
pcall(function(msg)
warn(msg)
end)
Also, I am using a DataStore and the leaderboard does exist
Line 5 is fine but Line 2 is the problem
Help would be appreciated

5 comments
Is this the full script? It doesn't seem like the error should be on line 5. If it is not what line is the error on the shortened version?
and what is msg?
it is a full version it is just line 2
msg is in a pcall just incase something errors with the script
everything inside that pcall makes no sense to me