In this GUI you input the player's name on a TextBox and when you click on a TextButton it should give the player inputted in the TextBox an economy ticket.
This is the script inside the TextButton
function o()
local text = "game.Players."..script.Parent.Parent.UsernameBox.Text
print(text.Name)
local plr = text
script.Economy:Clone().Parent = plr.Backpack
end
script.Parent.MouseButton1Click:Connect(o)
It does call the function, I just don't know how to make it find the player I want. Please help me!

1 comment
Thanks!