So, Ive made many questions about this topic but I still don't understand. I have made a script myself to test it out a little bit. This is what I made.
local Temp = game.Workspace.Temp.Value while true do wait(2) Temp = Temp + 1 end
But It doens't seem to work. What I want to do is make it add +1 to the NumberValue called "Temp" every 2 seconds. Anyone knows what is wrong?
Best Regards, kyanoke11
You are adding 1 to the variable Temp not the NumberValue object's value. When you do
local Temp = game.Workspace.Temp.Value
It sets Temp to the NumberValue's value. Then you are adding 1 to the Temp variable with your loop.
What you need to do is this
local Temp = game.Workspace.Temp while true do wait(2) Temp.Value = Temp.Value + 1 end