
Harvest Color Cycle
Build a small harvest interaction for a garden scene. Picking a ripe crop turns it green while the next harvest grows.
Get Script ↗Temporary link · OnlyFree homeAbout Harvest Color Cycle
Use this Luau script inside your own Roblox Studio place. Its source is included below.
What it does
Harvest prompt
A nearby Harvest prompt with a short hold
Crop colors
Distinct orange and green crop states
Regrowth timer
An eight-second shared regrowth timer
How to run it
Prepare the scene
Create an anchored Part in Workspace and use it as your crop.
Add the server Script
Insert a server Script under the crop and paste the Luau source.
Playtest the interaction
Press Play, stand beside the crop and use Harvest. Watch it turn green, then orange again. Set regrowSeconds to tune the delay.
View Luau source
-- Add this server Script to an anchored Part representing a crop.
local crop = script.Parent
assert(crop:IsA("BasePart"), "Place this Script inside a crop Part")
local regrowSeconds = 8
local ripeColor = Color3.fromRGB(255, 161, 58)
local growingColor = Color3.fromRGB(73, 151, 92)
crop.Color = ripeColor
local prompt = Instance.new("ProximityPrompt")
prompt.Name = "HarvestPrompt"
prompt.ActionText = "Harvest"
prompt.ObjectText = "Ripe crop"
prompt.HoldDuration = 0.4
prompt.MaxActivationDistance = 8
prompt.Parent = crop
prompt.Triggered:Connect(function(player)
local character = player.Character
local root = character and character:FindFirstChild("HumanoidRootPart")
if not prompt.Enabled or not root or (root.Position - crop.Position).Magnitude > 10 then
return
end
prompt.Enabled = false
crop.Color = growingColor
task.wait(regrowSeconds)
crop.Color = ripeColor
prompt.Enabled = true
end)
Questions
Can two players harvest at the same time?
The first accepted interaction disables the shared prompt until the crop ripens again.
What does the player receive?
This example changes the crop and starts its timer. You can connect your own reward code where the script changes the crop to green.


