Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Repeat Increase Value if Touching?

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

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

1 answer

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)

2 comments

0

how long, just like regenerating health if u step on a Medkit in BF

0

Oh.. So it keeps adding on until not touching?

This discussion is preserved as it was. New answers, comments, and votes are closed.