RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"make a randomly generating forest with trees and lakes and some grass"
-- server script (ServerScriptService) local function generateForest() for i = 1, 100 do local tree = game.ServerStorage.Tree:Clone() local lake = game.ServerStorage.Lake:Clone() local grass = game.ServerStorage.Grass:Clone() local randomPosition = Vector3.new(math.random(-1000, 1000), 0, math.random(-1000, 1000)) tree.Position = randomPosition lake.Position = randomPosition + Vector3.new(0, -10, 0) grass.Position = randomPosition + Vector3.new(0, -5, 0) tree.Parent = game.Workspace lake.Parent = game.Workspace grass.Parent = game.Workspace wait(0.1) end end generateForest()