I have been stumped by this problem, it continually comes up with "Argument 1 missing or nil". I know it's a simple script but I have been stuck for hours. Can anyone debug it and end my suffering please. ;-;
script.Parent.MouseButton1Click:connect(function()
local directory = script.Parent.Parent
local player_name = directory["Name"].Text
local amount = directory["Amount"].Text
game.Players:FindFirstChild(player_name)["leaderstats"]["Coins"].Value =
game.Players:FindFirstChild(player_name)["leaderstats"]["Coins"].Value + tonumber(amount)
end)
Basically what I've got is a GUI with a name textbox and an amount textbox, without any text in them and only placeholder text. Heres a picture:
