Need help on scripting

I am making a floor tile generator, for a game like the backrooms but script wont work. It is supposed to be a 500 by 500 place with custom random generated rooms. Can you please help.

local Position = CFrame.new(0,0,0)
local posX = 0

for i = 1, 100 do
	local items = Track:GetChildren()
	local TrackPart = items[math.random(1, #items)]:Clone()
	TrackPart.Parent = game.Workspace
	TrackPart:SetPrimaryPartCFrame(Position)
	
	posX += 25
	TrackPart.Position = Vector3.new(posX, 0,0)
	print(Position)
	wait()
end`

You need to go into more detail if you hope to get adequate help. For starters you can show us your script.
If you have a 500x500 map then you should probably create 50x50 tiles and use those to fill the space, however it’s not that simple you also need to make sure that rooms have doors in the right place so players can traverse the map and not just be stuck in a room that has dead end doors

1 Like