👨‍🍳 Cooking Simulator — ідеальна проста гра для початківця в Roblox Studio, бо ти зможеш навчитися:

  • працювати з колекцією об’єктів (інгредієнти),

  • робити взаємодію (взяти предмет → покласти на стіл),

  • створювати UI для рецептів.

Я розпишу план покроково, щоб ти міг зробити перший прототип за 1 вечір.


🔧 1. Підготовка сцени

Створюємо локацію

  • Зроби невелику кухню:

    • Стіл (Part, Anchored = true).

    • Каструля (MeshPart або простий Part, щоб гравець кладе туди інгредієнти).

    • Інгредієнти: наприклад, Tomato, Cheese, Bread.


🖱 2. Збір інгредієнтів

Крок 1: додаємо ProximityPrompt

  1. На кожен інгредієнт встав ProximityPrompt:

    • ActionText = "Взяти"

    • ObjectText = "Помідор" (для кожного інгредієнта свій текст).

    • HoldDuration = 0 (щоб не треба було утримувати).

Крок 2: скрипт для збору інгредієнтів

Встав Script у кожен інгредієнт:

local prompt = script.Parent:WaitForChild("ProximityPrompt") local Players = game:GetService("Players") prompt.Triggered:Connect(function(player) -- Клонуємо інгредієнт як Tool і додаємо у Backpack local tool = Instance.new("Tool") tool.Name = script.Parent.Name tool.RequiresHandle = false tool.Parent = player.Backpack -- Прибираємо інгредієнт з карти script.Parent:Destroy() end)

Тепер гравець може "взяти" предмет і носити його як Tool.


🍲 3. Готування в каструлі

Крок 1: створюємо каструлю

  • Створи Part → назви Pot.

  • Додай TouchInterest (він з’явиться автоматично при використанні Touched).

Крок 2: скрипт у каструлі

Встав Script у Pot:

local pot = script.Parent local correctRecipe = {"Tomato", "Cheese"} -- Рецепт: Помідор + Сир local addedIngredients = {} pot.Touched:Connect(function(hit) local character = hit.Parent local player = game.Players:GetPlayerFromCharacter(character) if player then -- Перевіряємо, що гравець тримає Tool local tool = character:FindFirstChildOfClass("Tool") if tool then table.insert(addedIngredients, tool.Name) tool:Destroy() -- Видаляємо Tool з рук print("Додано інгредієнт:", tool.Name) -- Перевірка рецепту if #addedIngredients == #correctRecipe then local success = true for _, ingredient in ipairs(correctRecipe) do if not table.find(addedIngredients, ingredient) then success = false break end end if success then print("✅ Рецепт готовий! Вітаю!") pot.BrickColor = BrickColor.Green() -- Візуальний ефект else print("❌ Неправильний рецепт!") pot.BrickColor = BrickColor.Red() end addedIngredients = {} -- Очищаємо каструлю end end end end)

Тепер гравець може носити інгредієнти й кидати їх у каструлю — якщо рецепт правильний, каструля змінює колір на зелений.


🖼 4. UI для рецептів

1. ModuleScript з рецептами

У ReplicatedStorage → створіть ModuleScript з назвою Recipes:

local Recipes = { ["Burger"] = {"Bread", "Meat", "Cheese"}, ["Pizza"] = {"Dough", "Tomato", "Cheese"}, ["Salad"] = {"Lettuce", "Tomato", "Cucumber"}, } return Recipes

2. Серверний скрипт (в ServerScriptService)

Створіть RemoteEvent у ReplicatedStorage → назвіть NewOrder.

local ReplicatedStorage = game:GetService("ReplicatedStorage") local Players = game:GetService("Players") local Recipes = require(ReplicatedStorage:WaitForChild("Recipes")) local newOrderEvent = ReplicatedStorage:WaitForChild("NewOrder") function giveRandomOrder(player) local recipeNames = {} for name, _ in pairs(Recipes) do table.insert(recipeNames, name) end local randomRecipe = recipeNames[math.random(1, #recipeNames)] newOrderEvent:FireClient(player, randomRecipe, Recipes[randomRecipe]) end -- Видавати замовлення при вході в гру Players.PlayerAdded:Connect(function(player) task.wait(5) giveRandomOrder(player) -- Кожні 60 секунд нове замовлення while player.Parent do task.wait(60) giveRandomOrder(player) end end)

3. LocalScript у GUI

У StarterGui → створіть ScreenGui → TextLabel + Frame для відображення замовлення.
У LocalScript:

local ReplicatedStorage = game:GetService("ReplicatedStorage") local newOrderEvent = ReplicatedStorage:WaitForChild("NewOrder") local orderLabel = script.Parent:WaitForChild("OrderLabel") -- TextLabel local ingredientsFrame = script.Parent:WaitForChild("IngredientsFrame") -- Frame з текстами newOrderEvent.OnClientEvent:Connect(function(recipeName, ingredients) orderLabel.Text = "Новий рецепт: " .. recipeName for _, child in ipairs(ingredientsFrame:GetChildren()) do if child:IsA("TextLabel") then child:Destroy() end end for _, ingredient in ipairs(ingredients) do local label = Instance.new("TextLabel") label.Size = UDim2.new(1,0,0,20) label.Text = "- " .. ingredient label.Parent = ingredientsFrame end end)

Як завершити систему:

  • Додати перевірку страви: коли гравець приносить страву клієнту → сервер перевіряє чи інгредієнти збігаються з рецептом.

  • Додати винагороду: leaderstats.Cash.Value += 50.

  • Додати таймер на виконання замовлення.