What i am asking is how to fix this script because as of now it does nothing. It was intended for a player to type in and the input was supposed to be added to that players leaderstat named "Money" I have no idea how to fix this can someone please teach me!!!
The Local Script:
script.Parent.TextBox.FocusLost:Connect(function() local text = script.Parent.TextBox.Text local money = game.Players.LocalPlayer:WaitForChild("leaderstats").Money.Value money = money + text end)
Screen GUI Setup:
https://pasteboard.co/HrhRSRL.png
You have to convert the text to a string using to number. You also can't make a variable with the value the way you did at line 3, because it will make money variable a number, not the actual int value. Try this code.
1 script.Parent.TextBox.FocusLost:Connect(function() 2 local text = script.Parent.TextBox.Text 3 local money = game.Players.LocalPlayer:WaitForChild("leaderstats").Money 4 money.Value = money + tonumber(text) 5 end)