Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to add a number (not set) to a Number Vaule? [closed]

Asked by 6 years ago

I already made a system that will detect if its higher then 0. But now I need to make a script that will add 1 to its count every 3 seconds. How is this possible?

if game.Workspace.global.Value > 0 then

(PS, Please give me the remove and set also ;) )

Closed as Not Constructive by lukeb50, RayCurse, and Programical

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

2 answers

Log in to vote
0
Answered by
GingeyLol 338 Moderation Voter
6 years ago
Edited 6 years ago
local value = game.Workspace.global.Value
if value > 0 then
while wait(3) do
value = value + 1
end
else return end

0
Wouldn't it be better to do `while value < 1 do`? TheeDeathCaster 2368 — 6y
Ad
Log in to vote
0
Answered by
lukeb50 631 Moderation Voter
6 years ago

Scripting Helpers is not a request site but I will tell you how to do it:

inside a loop with a wait of 3 seconds have a line that goes ....Value=....Value+1