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

How to print wait(math.random(1,30)/10) resulting number into the output?

For some reason I cannot figure out how to do this. What I am trying to do is make the number wait(math.random(1,30)/10) chooses print into the output. Thanks!


while true do
	script.Parent.PointLight.Enabled = false
		wait(math.random(1,30)/10)
	script.Parent.PointLight.Enabled = true
		wait(math.random(1,30)/10) 
end

4 comments

0

I'm pretty sure that you would have to do print wait(math.random(1.30)/10)

0

But I may be wrong!

0

Can you explain this better? Are you trying to determine what math.random returns and have that display in the output?

0

@marioblast1244 That worked perfectly thanks!

1 answer

local num=math.random (1,30)/10
local num2=math.random (1,30)/10
print (num)
while true do
    script.Parent.PointLight.Enabled 
wait (num)
print (num2)
    script.Parent.PointLight.Enabled = true
        wait(num2) end                             
~~~~~~~~~~~~~

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