How to make math.noise return the specified range

I’m working on some type of backroom project and want the rooms to have variations. I made a few templates but I’ve come across my first issue since the room generation is client sided, every client does not have the same rooms as other clients

I tried using remote functions but that’s unnecessarily slow and unreliable to do
so I thought why not try using math.noise instead of math.random? since it would be the same in the same position

(sorry if its a little hard to understand :grimacing:)

Why have the room generated on the client if you can just generate it on the server?

that would cause tons of issues, because this is infinitely generated, if you would do it on the server it would look weird and cause huge lag spikes

I think this is exactly what you are looking for. Random, Infinite Obby - Roblox Scripting Tutorial - YouTube
It is client sided.

1 Like

I don’t think this will work, my script generates the rooms in a nested loop


(sorry for the lag)

You can have the rooms generated on the server and also turn on streaming enabled.

how would I make it generate infinitely on the server? (sorry for the late response)

The video I sent creates a random seed for upon server starting. Then in every client game uses that random seed to create the obby. As the seed is same for every player, all of the obbies in every client will be same and in same order. It also uses RunService to create the obby as you go along the obby, which is great instead of having infinite obby creating instantly. I highly suggest changing your obby creation to this.

its exactly what the localscript was doing; except for the runservice part; when you move your camera, it’ll update the rooms and (delete the ones that aren’t in the range)

i dont think youre quite getting it, when the room gets destroyed because its no longer in range and happens to regenerate the room, it would be different

im currently using a chunk-based system, im confused to what im supposed to do.