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
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.
| Time scale | What the player does | Why it matters |
|---|---|---|
| Every 10 seconds | Plants, harvests ripe crops, walks to the sell stand | Constant small rewards while online |
| Every 5 minutes | Checks the shop restock for a rare seed | A shared moment: everyone sees the same stock |
| Every session | Harvests what grew overnight, replants, expands the plot | Coming back is rewarded, not punished |
| Rare moments | A mutation, a giant fruit, a weather event | Something 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
| System | What it does | Roblox pieces | Guide |
|---|---|---|---|
| Plots | Gives each player a garden when they join | Model per plot, attributes (OwnerId) | Steal a Brainrot (bases) |
| Planting and growth | Plants by timestamp, growth from the clock | ProximityPrompt, CollectionService, os.time | This page |
| Harvest roll | Random weight and rare mutations on the server | math.random or Random | This page |
| Seed shop and restock | Stock shared by all servers, refreshed on a timer | Random.new with a clock seed, attributes | This page |
| Shop screen | Shows stock, prices and the restock countdown | ScreenGui, ScrollingFrame | Shop GUI |
| Selling | Turns fruit into coins at a stand | ProximityPrompt, leaderstats | Coin collect |
| Inventory | Seeds and fruit the player carries | Tool or attributes, ScreenGui | Inventory |
| Weather events | Rain or storms that add mutation chances | Lighting, ParticleEmitter, clock seed | Day and night |
| Saving | Coins, seeds, and every planted soil with its time | DataStoreService, BindToClose | DataStore tutorial |
| Pets that help | A pet that speeds growth or harvests | Model, AlignPosition | Pet follow, Eggs |
Build plan: from a baseplate to launch
First playable (greybox)
- 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. - When a player joins, give them a free plot and set
OwnerIdon its soil parts. Give them a few starter seeds. - Add the growth script below with three seeds: one ripe in a minute, one in ten minutes, one in an hour.
- 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.
- Save Coins, seeds and every soil's
SeedandPlantedAt, then rejoin after ten minutes and check the plants grew while you were away.
First public test
- Plant models that change size as they grow (a LocalScript reads the
Growthattribute), and a countdown to the next restock on screen. - Eight to twelve seeds with rising prices and growth times, two of them rare in the shop.
- 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
- Plants that give several harvests before they must be replanted, plot expansions, and a first weather event.
- 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.
- 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.
-- 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
HeldSeedand theSeeds_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.FruitValueadds 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
SeedandPlantedAtwith 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.
-- 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
Randomwith 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.
Monetization that fits a garden game
| Product | Roblox feature | Fits the genre? |
|---|---|---|
| Buy a seed from the current stock | Developer product | Yes. Not random: the player sees the seed they buy. |
| Instant restock | Developer product | Yes, if it is only for that player's shop view, or announced if it restocks the server. |
| Growth speed-up | Developer product (consumable) or pass | Yes. Saves waiting, changes no odds. |
| Random seed pack | Developer product or Robux-bought currency | Allowed with the rules: every outcome and its percentage odds shown before purchase, plus the policy check. |
| Sprinkler or potion that raises mutation chance | Developer product or pass | A probability modifier: explain the new odds in numbers before purchase and update shown odds while it is active. |
| Plot expansion, extra gear slots | Pass | Yes. Space and convenience. |
| Private servers | Paid private servers | Yes. A quiet server to garden with friends. |
| Ad for a growth boost | Rewarded video ad | Yes, with a fixed developer product reward. Roblox's ad examples include a garden game giving a consumable item from a HUD button. |
Seed packs, luck and Roblox's rules
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
ArePaidRandomItemsRestrictedfromPolicyService:GetPolicyInfoForPlayerAsyncfor 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
IsPaidItemTradingAllowedbefore 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.
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.
- 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
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
- Roblox Creator Docs: Paid random items policy. capsule items, probability modifiers, odds disclosure, restricted players
- Roblox Creator Docs: PolicyService
- Roblox Creator Docs: Random. seeded generators
- Roblox Creator Docs: Rewarded video ads
- Roblox Creator Docs: Developer products
- Roblox Creator Docs: Passes
- Roblox Creator Docs: Private servers
- Roblox Creator Docs: ProximityPrompt
- RoCode guide: DataStore tutorial
- RoCode guide: Shop GUI
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.