✓ Accepted answer
Not sure if this is what you were asking, but I'll try to explain anyway. Let me know if this is not what you wanted. Since you're dealing with numbers you might want to use a numbervalue instead of a string value.
Is target a StringValue? You mention wanting to change a StringValue but it seems like target is a Part if I didn't know any better. I'm going to assume target is a string value.
Your current script almost works.
You are attempting to add 1 to target's value until the value reaches 100. Since target is a StringValue, n.Value + 1 will fail because you are trying to add a number to a StringValue.
You also did not define the variable n anywhere. You need to convert the stringvalue to a number to add one, and then convert it back to a string.
You also don't have a wait() anywhere so your code will run instantaneously adding up everything without any hesitation..
**You could do this instead, I included comments to explain the code. **
local myStringValue = workspace.StringValue
local targetNumber = 100
local startingNumber = tonumber(myStringValue.Value)
for i = startingNumber, targetNumber do
wait(1)
myStringValue.Value = tostring(startingNumber + 1)
end
incrementingNumber = false