I am trying to set the value of a intvalue to a random number

For some reason, this does not work:

while true do 
	wait(1)
	script.Parent.Value = math.random(1, 99999999)
end
2 Likes

You need to elaborate more. Also you should first check to see if the script is even running with a print function

It is working, but it gives this error:

Workspace.NPCs.walkspeed.Script:3: invalid argument #2 to 'random' (interval is empty)

Maybe the upper limit is too big, try setting it to a lower number

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.