How do I get math.randomseed(x) to work?

It isn’t working, and I need it for client-server pseudorandom prediction.

Input:
[lua]
math.randomseed(1234567) print(math.random(),math.random(),math.random())
math.randomseed(1234567) print(math.random(),math.random(),math.random())
[/lua]

Output:
0.33399456770531 0.93270668660543 0.10339671010468
0.89010284737693 0.53321939756462 0.57127597888119

[lua]
function math.CRCRandom(seed, min, max)
max = max +1
return tonumber((util.CRC(seed)…"."…util.CRC(seed))%(max-min) + min)
end

print(CRCRandom(1, 5, 10))
print(CRCRandom(2, 5, 10))
print(CRCRandom(5, 5, 10))
print(CRCRandom(5, 5, 10))
[/lua]

it has a flaw I think (I think it’s the float going above the maximum), but you can probably fix it

I use this in chatsounds without the float part to have equal randomness in all clients (sending the seed to clients), but I wouldn’t recommend using it often cause it might be performance heavy

:
I was going to use it for tracer predictions on a SWEP, because I had custom impact effects.
Really really laggy if there’s more than 3 players using the same SWEP.