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

Repeat Increase Value if Touching?

Asked by
KAAK82 16
10 years ago

How? so that u say Value = Value + 1 wait()

so that it would wait a lil before increasing again...

1 answer

Log in to vote
0
Answered by 10 years ago

You mean, how long the player is stepping on it, or how many times its been Stepped on?

-- ANSWER --

--Sorry if this script doesn't work, my Studio is broken to I can't test any scripts., so I'm scripting from memory.

local NotTouch=true
script.Parent.Touched:connect(function()
if script:FindFirstChild("WHATEVER NAME HERE") and Touch then
NotTouch=false
repeat wait(1)  script.WHATEVERNAMEHERE.Value=script.WHATEVERNAMEHERE+1 until nil --You can change nil to the amount you want it to stop at
end end)
script.Parent.TouchEnded:connect(function()
NotTouch=true
end)
0
how long, just like regenerating health if u step on a Medkit in BF KAAK82 16 — 10y
0
Oh.. So it keeps adding on until not touching? TheeDeathCaster 2368 — 10y
Ad

Answer this question