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

(Solved)This script won't set an int value to a random number, but was working before, help?

Asked by 4 years ago
Edited 4 years ago

This script used to work fine, but I started changing some other stuff, and now its not working. I dont think I really changed this code where it would stop working, but I dont know why its not.

This is my code

local Amount = game.Lighting.Spawns.Spawned.Value
local gl = game.Lighting.Spawns
local Done = 0
while Done < Amount do
    local Number = math.random(1,10)
    gl.SpawnNum2.Value = Number
    wait(game.Lighting.Spawns.SpawnTime.Value)
    Done = Done + 1 
end

gl.Spawned.Value = gl.Spawned.Value + 2

0
What did you add and how much you added? Maybe this will help us to help you. Xapelize 2658 — 4y
0
I tried changing the int value to a number value and its working now. zandefear4 90 — 4y

Answer this question