I want my Int value to go up one every 30 seconds while in a true do loop, but I don't know how to add a number to a value here is my script so far:
local Wins = Instance.new("IntValue") Wins.Parent = leaderstats Wins.Name = "Wins" while true do --here is where I'm supposed to add to the int value but I don't know-how. end
Note: This is in a function.
Here is the wiki for Variables https://developer.roblox.com/en-us/articles/Variables
You can look through there, and if that doesn't help here is a sample script
while true do Wins.Value = Wins.Value + 1 -- The value of Wins turns into the value of Wins + 1 (1+1 = 2, 2+1 = 3, etc...) wait(30) end --[[ OFF TOPIC You can also do while wait(30) do ]]
while true do wait(30.1)--extra 0.1 secs for processing, feel free to change it back depending on how long --it takes Wins.Value+=1