Fire textbox texts

so i have a script that fire event:

script.Parent.MouseButton1Click:Connect(function(plr)
local nameinput = script.Parent.Parent.Usernameinput.Text
local amountinput = script.Parent.Parent.Amountinput.Text

game.ReplicatedStorage.Donate:FireServer(plr)
end)

and a script that handle the event:

game.ReplicatedStorage.Donate.OnServerEvent:Connect(function(plr)
print(plr.Name)
end)

i want to make the script fire both nameinput and amountinput, i tried this

Localscript:

script.Parent.MouseButton1Click:Connect(function(plr)
    local nameinput = script.Parent.Parent.Usernameinput.Text
    local amountinput = script.Parent.Parent.Amountinput.Text

    game.ReplicatedStorage.Donate:FireServer(plr,nameinput,amountinput)
    end)

serverscript:

game.ReplicatedStorage.Donate.OnServerEvent:Connect(function(plr,nameinput,amountinput)
print(plr.Name)
print(nameinput)
print(amountinput)
end)

but it prints this

(Enter Username is the nameinput, but the amountinput gives me a nil)

When you fire to the Server from the Client, the Player Object is automatically sent to the server, so all you need to do is to send the data.

game.ReplicatedStorage.Donate:FireServer(nameinput,amountinput) -- don't add "plr"

Everything else is fine :smiley:

oh lol that so simple xD, what a fast answer, thanks