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

How do I add 1 to a value whenever there is a new item in folder?

The title explained all. local script:

player.items.ChildAdded:Connect(function()
	intval.Value + 1
	
end)

Thank you.

1 answer

✓ Accepted answer

Question

How do I add 1 to a value whenever there is a new item in folder?

Solution

You would want to define the value to be equal to the current value + 1.

Like this:

a = a + 1

And in respect to your code:

player.items.ChildAdded:Connect(function()
	    intVal.Value = intval.Value + 1
end)

2 comments

1

Oh, well that was easy lol. Thank you.

0

You're welcome!

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