Skip to content
The Chat Archive
mistral-medium-2505· Mistral AI LMArena Human Preference 140K

i want to make a roblox game, where there spawns diffrent types of objects on the start…

  1. User

    i want to make a roblox game, where there spawns diffrent types of objects on the start of a red carpet, and the spawn is completely randomized, but it mostly spawns the common stuff and every object has a rarity from common - secret and when it spawns at the start of the carpet, it glides to the end of the carpet and it vanishes. if a player has enough money to buy the object it will glide to one of their platfroms in their base, and when its in their base, it generates money per second to the player, the rarer tho object is, the more money gets generated per sec,

  2. Assistant

    Roblox Red Carpet Collectible Game Concept

    This sounds like a fun idle/collection game! Here's how you could implement this in Roblox:

    Core Mechanics

    1. Object Spawning System

    -- In a ServerScriptService script
    local ReplicatedStorage = game:GetService("ReplicatedStorage")
    local ObjectsFolder = ReplicatedStorage:WaitForChild("Objects")
    
    local spawnPoints = workspace:WaitForChild("SpawnPoints"):GetChildren()
    local carpetPath = workspace:WaitForChild("CarpetPath")
    
    local rarities = {
        Common = {weight = 60, color = Color3.fromRGB(100, 100, 100)},
        Uncommon = {weight = 25, color = Color3.fromRGB(50, 200, 50)},
        Rare = {weight = 10, color = Color3.fromRGB(50, 50, 255)},
        Epic = {weight = 4, color = Color3.fromRGB(150, 50, 200)},
        Legendary = {weight = 1, color = Color3.fromRGB(255, 215, 0)},
        Secret = {weight = 0.1, color = Color3.fromRGB(255, 0, 0)}
    }
    
    local totalWeight = 0
    for _, rarity in pairs(rarities) do
        totalWeight += rarity.weight
    end
    
    local function getRandomObject()
        local randomValue = math.random() * totalWeight
        local cumulativeWeight = 0
    
        local selectedRarity
        for rarityName, rarity in pairs(rarities) do
            cumulativeWeight += rarity.weight
            if randomValue <= cumulativeWeight then
                selectedRarity = rarityName
                break
            end
        end
    
        local objects = ObjectsFolder:FindFirstChild(selectedRarity):GetChildren()
        local randomObject = objects[math.random(1, #objects)]
    
        return randomObject:Clone(), selectedRarity
    end
    
    local function spawnObject()
        local spawnPoint = spawnPoints[math.random(1, #spawnPoints)]
        local object, rarity = getRandomObject()
    
        -- Set up object properties
        object:SetAttribute("Rarity", rarity)
        object:SetAttribute("Value", calculateValue(rarity))
        object:SetAttribute("Income", calculateIncome(rarity))
    
        -- Visual setup
        object.Color = rarities[rarity].color
        object.Material = Enum.Material.Neon
    
        -- Position and movement
        object.CFrame = spawnPoint.CFrame
        object.Parent = workspace
    
        -- Move along carpet
        local path = carpetPath:GetChildren()
        for _, point in ipairs(path) do
            local tweenInfo = TweenInfo.new(1, Enum.EasingStyle.Linear)
            local tween = game:GetService("TweenService"):Create(object, tweenInfo, {CFrame = point.CFrame})
            tween:Play()
            tween.Completed:Wait()
        end
    
        -- Object reaches end and vanishes
        object:Destroy()
    end
    
    -- Spawn objects every few seconds
    while true do
        spawnObject()
        wait(3) -- Adjust spawn rate as needed
    end
    

    2. Player Collection System

    -- In a LocalScript in StarterPlayerScripts
    local Players = game:GetService("Players")
    local player = Players.LocalPlayer
    local ReplicatedStorage = game:GetService("ReplicatedStorage")
    
    local playerGui = player:WaitForChild("PlayerGui")
    local collectionGui = playerGui:WaitForChild("CollectionGui")
    
    local function setupObjectInteraction(object)
        local proximityPrompt = Instance.new("ProximityPrompt")
        proximityPrompt.Parent = object
        proximityPrompt.ActionText = "Collect"
        proximityPrompt.HoldDuration = 0.5
        proximityPrompt.ObjectText = object.Name
    
        proximityPrompt.Triggered:Connect(function()
            local rarity = object:GetAttribute("Rarity")
            local value = object:GetAttribute("Value")
    
            -- Check if player has enough money
            local leaderstats = player:FindFirstChild("leaderstats")
            if leaderstats and leaderstats:FindFirstChild("Money") then
                local money = leaderstats.Money.Value
                if money >= value then
                    -- Deduct money
                    leaderstats.Money.Value = money - value
    
                    -- Send to player's base
                    local remoteEvent = ReplicatedStorage:WaitForChild("CollectObject")
                    remoteEvent:FireServer(object, rarity)
    
                    -- Visual feedback
                    local notification = Instance.new("TextLabel")
                    notification.Text = "Collected "..object.Name.."!"
                    notification.Size = UDim2.new(0.3, 0, 0.1, 0)
                    notification.Position = UDim2.new(0.35, 0, 0.8, 0)
                    notification.BackgroundTransparency = 1
                    notification.TextColor3 = Color3.new(1, 1, 1)
                    notification.TextScaled = true
                    notification.Parent = collectionGui
                    game.Debris:AddItem(notification, 2)
                else
                    -- Not enough money notification
                    local notification = Instance.new("TextLabel")
                    notification.Text = "Not enough money!"
                    notification.Size = UDim2.new(0.3, 0, 0.1, 0)
                    notification.Position = UDim2.new(0.35, 0, 0.8, 0)
                    notification.BackgroundTransparency = 1
                    notification.TextColor3 = Color3.new(1, 0, 0)
                    notification.TextScaled = true
                    notification.Parent = collectionGui
                    game.Debris:AddItem(notification, 2)
                end
            end
        end)
    end
    
    -- Connect to objects being spawned
    game.Workspace.ChildAdded:Connect(function(child)
        if child:FindFirstChild("ProximityPrompt") then return end
        if child:FindFirstAttribute("Rarity") then
            setupObjectInteraction(child)
        end
    end)
    

    3. Player Base and Income System

    -- In a ServerScriptService script
    local Players = game:GetService("Players")
    local ReplicatedStorage = game:GetService("ReplicatedStorage")
    
    local function calculateIncome(rarity)
        local incomeRates = {
            Common = 1,
            Uncommon = 5,
            Rare = 20,
            Epic = 100,
            Legendary = 500,
            Secret = 2000
        }
        return incomeRates[rarity] or 1
    end
    
    local function calculateValue(rarity)
        local values = {
            Common = 10,
            Uncommon = 50,
            Rare = 200,
            Epic = 1000,
            Legendary = 5000,
            Secret = 20000
        }
        return values[rarity] or 10
    end
    
    local function setupPlayer(player)
        local leaderstats = Instance.new("Folder")
        leaderstats.Name = "leaderstats"
        leaderstats.Parent = player
    
        local money = Instance.new("IntValue")
        money.Name = "Money"
        money.Value = 1000 -- Starting money
        money.Parent = leaderstats
    
        local income = Instance.new("IntValue")
        income.Name = "Income"
        income.Value = 0
        income.Parent = leaderstats
    
        -- Create player base
        local baseTemplate = ReplicatedStorage:WaitForChild("BaseTemplate")
        local base = baseTemplate:Clone()
        base.Name = player.Name.."'sBase"
        base.Parent = workspace.Bases
        base:SetAttribute("Owner", player)
    
        -- Set up income generation
        while true do
            if player and player:FindFirstChild("leaderstats") then
                local currentIncome = income.Value
                money.Value = money.Value + currentIncome
            end
            wait(1)
        end
    end
    
    local function onObjectCollected(player, object, rarity)
        -- Check if player has a base
        local base = workspace.Bases:FindFirstChild(player.Name.."'sBase")
        if not base then return end
    
        -- Find an empty platform
        local platforms = base:WaitForChild("Platforms"):GetChildren()
        for _, platform in ipairs(platforms) do
            if not platform:FindFirstChildWhichIsA("Model") then
                -- Place object on platform
                local collectedObject = object:Clone()
                collectedObject.CFrame = platform.CFrame
                collectedObject.Parent = platform
    
                -- Update player's income
                local income = player:FindFirstChild("leaderstats"):FindFirstChild("Income")
                if income then
                    income.Value = income.Value + calculateIncome(rarity)
                end
    
                -- Remove from carpet
                object:Destroy()
                break
            end
        end
    end
    
    -- Set up players
    Players.PlayerAdded:Connect(setupPlayer)
    
    -- Handle object collection
    local remoteEvent = Instance.new("RemoteEvent")
    remoteEvent.Name = "CollectObject"
    remoteEvent.Parent = ReplicatedStorage
    remoteEvent.OnServerEvent:Connect(onObjectCollected)
    

    Game Setup Instructions

    1. Create the Carpet Path:

      • Make a path of parts in your workspace named "CarpetPath" with numbered parts (PathPoint1, PathPoint2, etc.)
      • Create spawn points at the start of the carpet in a folder called "SpawnPoints"
    2. Create Object Templates:

      • In ReplicatedStorage, create a folder called "Objects"
      • Inside it, create subfolders for each rarity (Common, Uncommon, etc.)
      • Add different object models to each rarity folder
    3. Create Player Base Template:

      • In ReplicatedStorage, create a "BaseTemplate" with platforms where objects will be placed
      • Each platform should be a part where collected objects will sit
    4. Set Up UI:

      • Create a ScreenGui in StarterGui with a TextLabel for collection notifications
      • Add a leaderboard to show player money and income
    5. Adjust Values:

      • Modify the rarity weights, values, and income rates in the scripts to balance your game

    Additional Features to Consider

    1. Object Display Cases: Add special display cases for rare objects
    2. Upgrades: Allow players to upgrade their objects to increase income
    3. Trading System: Let players trade objects with each other
    4. Special Events: Occasionally spawn rare objects during events
    5. Visual Effects: Add particles or sounds when objects spawn or are collected

    Would you like me to elaborate on any specific part of this implementation?

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.