It's supposed to generate a new number every time the function is called with the variable SpawnChance. Instead, it generates values such as '1C94F9E0' and whatnot, and it prints the same thing over and over.
I want it to print a randomized number from 1 to 200, and a different number every time the function is called.
math.randomseed(tick())
function SpawnChests()
local SpawnChance = math.random (1,200)
print(SpawnChests)
end
while true do
wait(5)
SpawnChests()
end

1 comment
This is what I get for scripting at midnight, haha. Thank you!!