Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Add two values and display them in a surfacegui textbox. why not work?

a player uploading their points (cash) to a display board, then their points are reset to 0

textbox = game.Workspace.displayscreen.SurfaceGui.Frame.TextBox.Text.Value
 
script.Parent.Touched:connect (function(hit)
	

local humanoid = hit.Parent:FindFirstChild("Humanoid")
	if humanoid then
	local playervalue = game.Players.LocalPlayer.leaderstats.Cash.Value
	
	textbox =  playervalue + tonumber(textbox)
	game.Players.LocalPlayer.leaderstats.Cash.Value = 0
	
	
	wait()
	end
	
end)

1 answer

✓ Accepted answer

The problem is at line 1: "TextBox.Text**.Value**"

Remove ".Value"

This discussion is preserved as it was. New answers, comments, and votes are closed.