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)