Game genres

How to make a Grow a Garden style game in Roblox Studio

A game like Grow a Garden looks like a farming game, but it plays like a calm idle game with a stock market attached. You buy seeds from a shop whose stock changes every few minutes, plant them in your own plot, and come back later to harvest fruit that might be unusually heavy or carry a rare mutation. The plants keep growing while you are away, which is the whole hook. This guide covers what makes the genre work, the systems, a build plan, real-time growth and a shared restock in Luau, and the Roblox rules that apply to seed packs and luck items.

Updated 26 October 20269 min readGenre guide

In short

A garden game needs a plot per player, a seed shop that restocks on a timer, plants that store when they were planted (so growth is just the current time minus that, and continues offline), a harvest roll for weight and rare mutations, and a sell stand. Roll the shop stock from the clock so every server shows the same seeds at the same moment. If you sell random seed packs, or items that raise mutation odds, for Robux or Robux-bought currency, Roblox's paid random items rules apply.

  • Never grow plants with a countdown that only runs while the player is in the server. Save the planting time and work out growth from it.
  • The shop restock is the genre's heartbeat: a rare seed in stock for five minutes is why players come back and why they talk about the game.
  • A sprinkler or potion sold for Robux that raises mutation chance must state its effect in numbers, and shown odds must update while it is active.
On this page
  1. What makes it work
  2. Systems
  3. Build plan
  4. Growth code
  5. Restock code
  6. Monetization
  7. Retention
  8. With RoCode
  9. Questions
  10. Sources

What makes a garden game work

The loop in one line: buy seeds, plant, wait, harvest, sell, buy better seeds. The wait is the design. Short-growing plants give something to do now; long-growing ones give a reason to return tomorrow.

The pillars of a garden game, by time scale
Time scaleWhat the player doesWhy it matters
Every 10 secondsPlants, harvests ripe crops, walks to the sell standConstant small rewards while online
Every 5 minutesChecks the shop restock for a rare seedA shared moment: everyone sees the same stock
Every sessionHarvests what grew overnight, replants, expands the plotComing back is rewarded, not punished
Rare momentsA mutation, a giant fruit, a weather eventSomething to show friends and screenshot

What separates the garden games that kept players from the copies that faded is mostly the economy and the clock. If rare seeds are in stock too often, there is nothing to wait for. If harvests sell for too much, players finish the seed list in a weekend. The best ones also make the plot feel like yours: a garden that fills up and looks different from everyone else's is worth visiting.

This genre overlaps with farming games, but the differences decide your systems. A classic farm sim is about tools, seasons and chores; a garden game is about timers, stock and luck. If you want hoes, watering cans and fishing, see the farming game guide.

The systems you need

Garden game systems and where to learn each one
SystemWhat it doesRoblox piecesGuide
PlotsGives each player a garden when they joinModel per plot, attributes (OwnerId)Steal a Brainrot (bases)
Planting and growthPlants by timestamp, growth from the clockProximityPrompt, CollectionService, os.timeThis page
Harvest rollRandom weight and rare mutations on the servermath.random or RandomThis page
Seed shop and restockStock shared by all servers, refreshed on a timerRandom.new with a clock seed, attributesThis page
Shop screenShows stock, prices and the restock countdownScreenGui, ScrollingFrameShop GUI
SellingTurns fruit into coins at a standProximityPrompt, leaderstatsCoin collect
InventorySeeds and fruit the player carriesTool or attributes, ScreenGuiInventory
Weather eventsRain or storms that add mutation chancesLighting, ParticleEmitter, clock seedDay and night
SavingCoins, seeds, and every planted soil with its timeDataStoreService, BindToCloseDataStore tutorial
Pets that helpA pet that speeds growth or harvestsModel, AlignPositionPet follow, Eggs

Build plan: from a baseplate to launch

First playable (greybox)

  1. Build six plots around a central square with a seed shop counter and a sell stand. Each plot gets a grid of soil parts tagged Soil.
  2. When a player joins, give them a free plot and set OwnerId on its soil parts. Give them a few starter seeds.
  3. Add the growth script below with three seeds: one ripe in a minute, one in ten minutes, one in an hour.
  4. Add the sell stand: it pays the player's fruit value into Coins and resets it. Add the restock script and a shop counter that sells the current stock for Coins.
  5. Save Coins, seeds and every soil's Seed and PlantedAt, then rejoin after ten minutes and check the plants grew while you were away.

First public test

  1. Plant models that change size as they grow (a LocalScript reads the Growth attribute), and a countdown to the next restock on screen.
  2. Eight to twelve seeds with rising prices and growth times, two of them rare in the shop.
  3. Publish and watch how long players take to buy the most expensive seed. If it is one session, prices or growth times are too low.

Before launch

  1. Plants that give several harvests before they must be replanted, plot expansions, and a first weather event.
  2. Gear (a sprinkler that speeds growth nearby), a pet or two, and the monetization from the table below with the policy check on anything random.
  3. A performance pass: a full plot is many parts, and dozens of players' gardens are many more. Keep plant models simple and test with a full server.

Plants that grow while you are offline

Each soil part stores two attributes: Seed and PlantedAt, the os.time() when it was planted. Growth is never counted down; it is worked out from the clock whenever it is needed, so a plant that was saved and loaded the next day is simply ripe. The same prompt plants on empty soil and harvests ripe plants, and the harvest rolls a weight and a 2% Golden mutation on the server.

Script in ServerScriptService named GardenGrowth
-- Script in ServerScriptService named GardenGrowth.
-- Soil parts tagged "Soil" (with an OwnerId attribute set when a plot is given out)
-- grow plants by the clock: a plant stores when it was planted, not a timer.
local CollectionService = game:GetService("CollectionService")

type Seed = { growSeconds: number, value: number }
local SEEDS: { [string]: Seed } = {
	Carrot = { growSeconds = 60, value = 10 },
	Melon = { growSeconds = 600, value = 90 },
	Starfruit = { growSeconds = 3600, value = 700 },
}
local GOLDEN_CHANCE = 0.02 -- 2 in 100 harvests are Golden, worth 5 times as much

-- 0 when planted, 1 when ripe. os.time() keeps counting while the owner is away.
local function growth(soil: Instance): number
	local seed = SEEDS[tostring(soil:GetAttribute("Seed"))]
	local plantedAt = tonumber(soil:GetAttribute("PlantedAt"))
	if not seed or not plantedAt then
		return 0
	end
	return math.clamp((os.time() - plantedAt) / seed.growSeconds, 0, 1)
end

local function setUpSoil(soil: Instance)
	if not soil:IsA("BasePart") then
		return
	end
	local prompt = Instance.new("ProximityPrompt")
	prompt.ActionText = "Plant"
	prompt.Parent = soil
	prompt.Triggered:Connect(function(player: Player)
		if soil:GetAttribute("OwnerId") ~= player.UserId then
			return -- only the plot's owner
		end
		local planted = soil:GetAttribute("Seed")
		if planted == nil then
			local held = tostring(player:GetAttribute("HeldSeed"))
			local count = tonumber(player:GetAttribute("Seeds_" .. held)) or 0
			if SEEDS[held] and count > 0 then
				player:SetAttribute("Seeds_" .. held, count - 1)
				soil:SetAttribute("Seed", held)
				soil:SetAttribute("PlantedAt", os.time())
			end
		elseif growth(soil) >= 1 then
			local seed = SEEDS[tostring(planted)]
			local golden = math.random() < GOLDEN_CHANCE
			local weight = 0.8 + math.random() * 0.7 -- a heavier fruit sells for more
			local price = math.floor(seed.value * weight * (if golden then 5 else 1))
			player:SetAttribute("FruitValue", (tonumber(player:GetAttribute("FruitValue")) or 0) + price)
			soil:SetAttribute("Seed", nil)
			soil:SetAttribute("PlantedAt", nil)
		end
	end)
end

for _, soil in CollectionService:GetTagged("Soil") do
	setUpSoil(soil)
end
CollectionService:GetInstanceAddedSignal("Soil"):Connect(setUpSoil)

-- Share each plant's growth with clients so a LocalScript can scale the plant model
while true do
	task.wait(1)
	for _, soil in CollectionService:GetTagged("Soil") do
		soil:SetAttribute("Growth", growth(soil))
	end
end
  • HeldSeed and the Seeds_ counts are player attributes here to keep the script short. In your game, set them from your inventory on the server only, never from a client message without checks.
  • FruitValue adds up harvests until the player sells them. For a garden where each fruit is an item to show off or trade, store fruits as a list with their weight and mutation instead.
  • To make plants grow in the player's absence, save every soil's Seed and PlantedAt with the player's data and set them back on their plot when they join. Because the plot may be a different one next time, save soil by its position in the grid (Soil1, Soil2...), not by the part itself.

A seed shop that restocks on a shared clock

Players compare shops across servers and tell friends when a rare seed is in stock, so the stock should be the same everywhere. Instead of servers messaging each other, every server divides the current time into five-minute windows and seeds a Random with the window number. Roblox documents that the same seed gives an identical generator, so every server rolls the same stock for the same window.

Script in ServerScriptService named SeedShopStock
-- Script in ServerScriptService named SeedShopStock.
-- The seed shop restocks every 5 minutes. The stock is rolled from the clock, so
-- every server shows the same seeds at the same time without talking to each other.
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local RESTOCK_SECONDS = 300
type Offer = { seed: string, chance: number, maxStock: number }
local OFFERS: { Offer } = {
	{ seed = "Carrot", chance = 1, maxStock = 20 }, -- always in stock
	{ seed = "Melon", chance = 0.4, maxStock = 5 },
	{ seed = "Starfruit", chance = 0.05, maxStock = 1 }, -- in about 1 restock in 20
}

local shop = Instance.new("Folder")
shop.Name = "SeedShop"
shop.Parent = ReplicatedStorage

local function restock(window: number)
	-- Same window number on every server, so the same rolls on every server
	local rng = Random.new(window)
	for _, offer in OFFERS do
		local inStock = rng:NextNumber() < offer.chance
		local amount = if inStock then rng:NextInteger(1, offer.maxStock) else 0
		shop:SetAttribute(offer.seed, amount)
	end
	shop:SetAttribute("NextRestock", (window + 1) * RESTOCK_SECONDS) -- for a countdown on screen
end

local current = -1
while true do
	local window = os.time() // RESTOCK_SECONDS
	if window ~= current then
		current = window
		restock(window)
	end
	task.wait(1)
end
  • The stock amounts are shared, but purchases are not: give each player their own count per window (in a table keyed by player), so one player cannot buy out another server's rare seed.
  • Weather works the same way: seed a Random with a longer window, roll whether a storm happens in it, and every server gets the storm at the same time.
  • The shop shows exactly which seeds you are buying, so buying from it is not random. Random seed packs are a different product: see below.
Screenshot from a Roblox Studio playtest: the shop screen from RoCode's gold UI kit, with item cards and prices
Studio screenshot. The shop screen RoCode can add from its UI kits, in the gold theme. For a seed shop, fill the cards from the SeedShop folder's attributes.

Monetization that fits a garden game

What players accept, and which products fall under the paid random items rules
ProductRoblox featureFits the genre?
Buy a seed from the current stockDeveloper productYes. Not random: the player sees the seed they buy.
Instant restockDeveloper productYes, if it is only for that player's shop view, or announced if it restocks the server.
Growth speed-upDeveloper product (consumable) or passYes. Saves waiting, changes no odds.
Random seed packDeveloper product or Robux-bought currencyAllowed with the rules: every outcome and its percentage odds shown before purchase, plus the policy check.
Sprinkler or potion that raises mutation chanceDeveloper product or passA probability modifier: explain the new odds in numbers before purchase and update shown odds while it is active.
Plot expansion, extra gear slotsPassYes. Space and convenience.
Private serversPaid private serversYes. A quiet server to garden with friends.
Ad for a growth boostRewarded video adYes, with a fixed developer product reward. Roblox's ad examples include a garden game giving a consumable item from a HUD button.

Roblox's paid random items policy covers random items bought with Robux directly or indirectly, including with a currency players can buy with Robux. A random seed pack is a capsule item like an egg. Luck boosts and "enhanced resource drops" are named as probability modifier items. In practice for a garden game:

  • Show every seed a pack can give, with its odds as percentages that add up to exactly 100%, before purchase. A pop-up behind a button with a word such as "Details" is fine; a bare (i) symbol is not.
  • For a paid mutation boost, state the odds with and without it, and show the boosted odds while it is active.
  • Read ArePaidRandomItemsRestricted from PolicyService:GetPolicyInfoForPlayerAsync for each player. When it is true, offer an earnable path, sell the seed directly at a price based on its expected value, or block the pack with a message. The pet game guide has a script that reads the policy.
  • Rewarded video rewards cannot be randomized items, so an ad can give a growth boost or coins, never a seed pack.
  • If fruit or seeds bought with Robux can be traded, check IsPaidItemTradingAllowed before letting a player trade them.

What brings players back

  • Real-time growth. An hour-long plant planted before logging off is a reason to log in. This is the genre's strongest pull, so make sure it never fails to save.
  • The restock clock. A countdown on screen and a rare seed every so often keep players checking.
  • Weather events. A storm that adds a mutation chance for a few minutes brings a server together.
  • New seeds as updates. Each new seed, with its own growth time and look, is a small update players notice.
  • Daily rewards paid in seeds, and a collection index of every fruit and mutation found.

Build it with RoCode

RoCode is an AI agent that builds in the Roblox Studio place you have open: you describe the game in a web chat and its free Studio plugin creates the scripts, parts and UI. For a garden game it can build the plots and soil grid, the timestamp growth and harvest scripts, a restocking seed shop and a sell stand, and add UI kit screens such as a shop, inventory, daily rewards and a collection index. It cannot make plant meshes, so plants are built from parts, made by its nature generator or found as free Creator Store models by searching with your words. A whole garden game is built in rounds, one working part at a time.

You type

Make the first playable of a Grow a Garden style game with my own seed names: a plot with 12 soil tiles for each player, a seed shop whose stock restocks every 5 minutes, plants that grow by real time from when they were planted (also while I am offline), a harvest with random weight and a rare golden mutation, a sell stand for coins, and saving.

RoCode does
  • Builds the plots, soil, shop counter and sell stand, and writes the growth, restock and saving scripts
  • Can add UI kit screens such as a shop, inventory, daily rewards and a collection index
  • Can run a test robot that walks to a soil tile, plants and presses prompts, and report PASS or FAIL
  • Takes screenshots in edit mode to check how the garden looks

Build this in Studio

You still set the prices and growth times and test the economy with real players. How RoCode builds a game in rounds.

Questions

How do you make a game like Grow a Garden in Roblox Studio?

Give each player a plot of soil, sell seeds from a shop that restocks on a timer, store when each plant was planted so it grows from the clock, roll weight and mutations on harvest, and sell fruit for coins. Use your own seed names and art.

How do plants keep growing when players are offline?

Save the time each plant was planted, not a countdown. When the player returns, growth is the current time minus that time, divided by the plant's growth time.

How do I make every server have the same shop stock?

Seed a Random with the current five-minute window number (os.time divided by 300, rounded down). Every server gets the same window number and so rolls the same stock.

Are seed packs allowed on Roblox?

Yes, with rules when they cost Robux or Robux-bought currency: show every outcome with percentage odds before purchase, explain any paid luck boost in numbers, and handle players for whom PolicyService says paid random items are restricted.

How is this different from a farming game?

A garden game is built around timers, a restocking shop and lucky harvests. A farming game leans on tools, chores and seasons. Many games mix the two.

Sources and further reading

How the code was checked: every script on this page passes Luau's strict type checker against Roblox's API definitions (luau-lsp, 26 October 2026). A type check catches misspelt APIs and wrong types, not game logic, so playtest in Studio before you publish.

Try RoCode on your own place.

Free every day, no card required. Install the plugin, describe the feature, and review what lands in Studio.