The following sine wave is not random. How do I make it random?
local x = 1
for count = x,10 do
x = x + 1
local noiseHeight = math.noise(x/50 * 1.4, x/50 * 1.4)
noiseHeight = math.clamp(noiseHeight, -4, 4) + 1
print(noiseHeight)
end
The following sine wave is not random. How do I make it random?
local x = 1
for count = x,10 do
x = x + 1
local noiseHeight = math.noise(x/50 * 1.4, x/50 * 1.4)
noiseHeight = math.clamp(noiseHeight, -4, 4) + 1
print(noiseHeight)
end
A noise function is not random with respect to time. If you want that, you can use tick() as the third input to noise().
yeah but i want it to be truly random
It is random, though? How do you suppose somebody could predict the output?
i attempted to add tick() to the math.noise but it keeps producing the same output every time i ran the script
Show your updated code using tick, you might not be using it right.
Try using math.random(1000) instead