while script.Parent.anxiety.Value == true do
wait(1)
script.Parent.timeSpent.Value = script.Parent.timeSpent.Value + 1
end
Nothing happens when I do this. The value remains the same at 0. It runs through this loop I know it works I've used print to get it but the value does NOT change. Yes this is a normal script. Didn't run it with a LocalScript 'cause I figure that wouldn't work either since LocalScript is mostly useful for like keybinding and such. Plus laziness. It's 2:49 PM.

5 comments
Format your code in Lua code block
Where is the script located?
The script is located inside of a model in Workspace, it's siblings with the numbervalue "timeSpent".
I don't know what else you did... but I simply created a model that includes a numbervalue named timeSpent, a booleanvalue named anxiety, and a script containing your code. Everything went fine, timeSpent increased by 1 every 1 second.
I figured it out. I meant to post this earlier but must've forgotten. I had other .Touched events and booleans and waits and all that jazz and then I threw this loop in there. Figured that must be the problem so I placed it in a separate script and now it's working nicely. Thanks anyway y'all!