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

How you make the seconds random ?

Asked by
Bulvyte 388 Moderation Voter
8 years ago
while true do
    script.Parent.Enabled = false
    wait(3) -- <<<< like the repeater it repeats but seconds go random like from 2 to maximum 5
    script.Parent.Enabled = true 
    wait(3)  -- same here minimum 2 maximum 5
end

1 answer

Log in to vote
3
Answered by 8 years ago

This is quite a simple function that can be aconmplished using "math.random"

while true do
    script.Parent.Enabled = false
    wait(math.random(1,5)) --this would choose any random number between 1 and 5 including 1 and 5
    script.Parent.Enabled = true 
    wait(math.random(1,5))
end

Hope this helped!! If it did make sure to click accept answer!!

0
thx :3 Bulvyte 388 — 8y
0
No problem! minikitkat 687 — 8y
0
If you can accept my party invite please Bulvyte 388 — 8y
Ad

Answer this question