player = script.Parent.Parent.Parent.Parent.Parent
bal = player.bal
text = script.Parent.Text
num = tonumber(text)
script.Parent.FocusLost:connect(function()
print(player.Name)
print(text)
print(num)
if player.leaderstats.Cash.Value >= num then
print(text)
bal.Value = bal.Value + num
end
end)
I'm trying to make an ATM, this is for the deposit part. no matter what i put into the textbox, it always prints this:
Player1
0
0
0
and it doesn't add to the bal value. whats worng with this?

1 comment
thank you