This is from a Script.. The amount.Text is the Textbox. When I print the textbox value it says nil. I know the problem is it is not getting the updated text from the textbox I just don't know how to make that happen.

giveMoney.MouseButton1Down:connect(function()
local givePlayer = getPlayerFromName(SelectedPlayer.Text)
local Giveamount = amount.Text and tonumber(amount.Text)
print(Giveamount)
	cash.cashGive(givePlayer, Giveamount)
end)

2 comments

0

can you provide the path to amount please?

0

local amount = script.Parent.GiveMoney.Amount