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

Hey ChatGPT! I'm making a Roblox game inspired by fish games like Fish Eat Getting Big…

  1. User

    Hey ChatGPT! I'm making a Roblox game inspired by fish games like Fish Eat Getting Big and Slither.io, but mine is fully 3D—not top-down. Players can swim in all directions (up, down, left, right) using WASD keys, along with controller and mobile support. We'll be using a custom fish character model instead of the default Roblox avatar.

    Here's my current setup:

    Workspace:

    • WaterPart (Transparent, Main Water Surface)

    • Environment

      • OceanFloor (Already setup: Base terrain or parts)
      • CoralClusters (Interactive)
      • Seaweed (Animated)
      • BackgroundElements (Silhouettes, Fish)

    Lighting:

    • PostProcessing

      • ColorCorrection
      • SunRays
      • DepthOfField

    I need you to clearly explain what folders, scripts, local scripts, and module scripts I should use to run the game, and where exactly to place them. Imagine you're explaining this to a 7-year-old developer just starting Roblox Studio for the first time. Help me understand:

    • How to properly structure folders and scripts in the Roblox hierarchy.

    • If and when to use ReplicatedStorage for spawning objects (like fish), and clearly guide me through it.

    • Ensure the scripts spawn the custom fish character instead of my Roblox avatar.

    • Make the WaterPart swimmable using the following properties:

      • Size: (500, 50, 500)
      • Position: (0, 75, 0)
      • Transparency: 0.75
      • Color: RGB(85,170,255)

    The core gameplay loop:

    • Start as a small fish
    • Swim freely in 3D space
    • Eat food pellets and smaller fish
    • Grow bigger and evolve into stronger forms
    • Compete against AI or other players

    Please guide me step-by-step from scratch, covering:

    • Correct setup
    • Movement system (using the updated Roblox Studio 2025 constraints, like LinearVelocity, as BodyVelocity is deprecated)
    • Best practices for clean scripting
    • Folder and model structuring
    • Input handling
    • Basic gameplay mechanics

    This is my first full solo project to learn scripting, animation, UI, and game design fundamentals before tackling a larger Soul Eater-inspired anime game. I want clear, beginner-friendly yet efficient explanations—I aim to learn deeply, not just copy code.

    Please teach me like you're my coding mentor and development partner! 🎮🐟

    Feel free to check current Roblox Studio 2025 methods if needed to ensure compatibility with the latest updates.

  2. Assistant

    🎮🐟 Roblox 3D Fish Game Development Guide

    Welcome to your first solo Roblox project! I'm thrilled to be your coding mentor and development partner. Let's build this fish game together step by step. I'll explain everything in a way that's easy to understand but still teaches you the important concepts.

    📂 Project Structure Setup

    First, let's organize our project like a neat toy box. Here's how we'll structure everything:

    Game
    ├── Workspace
    │   ├── WaterPart (Part)
    │   ├── Environment
    │   │   ├── OceanFloor
    │   │   ├── CoralClusters
    │   │   ├── Seaweed
    │   │   └── BackgroundElements
    │   └── Fish (Folder - will contain spawned fish)
    ├── ReplicatedStorage
    │   ├── FishModels (Folder - contains all fish models)
    │   ├── GameSettings (ModuleScript)
    │   ├── SpawnManager (ModuleScript)
    │   └── FishController (ModuleScript)
    ├── ServerScriptService
    │   ├── GameManager (Script)
    │   └── FishSpawner (Script)
    ├── StarterPlayer
    │   ├── StarterPlayerScripts
    │   │   └── PlayerController (LocalScript)
    │   └── StarterCharacterScripts
    │       └── CharacterSetup (LocalScript)
    └── StarterGui
        └── UI (Folder - for all UI elements)
    

    🐟 Setting Up the Water

    Let's make our water first:

    1. In Workspace, create a Part named "WaterPart"
    2. Set these properties:
      • Size: (500, 50, 500)
      • Position: (0, 75, 0)
      • Anchored: true
      • CanCollide: false
      • Transparency: 0.75
      • Color: RGB(85, 170, 255)
      • Material: Water
      • Reflectance: 0.3

    🏗️ Creating the Fish Model

    1. In ReplicatedStorage, create a folder called "FishModels"
    2. Inside it, create a Model named "SmallFish"
    3. Add a MeshPart for the fish body (use a simple fish shape)
    4. Add a HumanoidRootPart (this will be our anchor point)
    5. Add a BodyVelocity and BodyGyro to the HumanoidRootPart (we'll use these for movement)

    🚀 Movement System

    Let's create the movement system using the new Roblox Studio 2025 methods:

    1. In ReplicatedStorage, create a ModuleScript named "FishController"
    2. Here's the basic movement code:
    -- FishController ModuleScript
    local FishController = {}
    
    function FishController.new(fish)
        local self = setmetatable({}, {__index = FishController})
    
        self.fish = fish
        self.root = fish:FindFirstChild("HumanoidRootPart")
        self.velocity = fish:FindFirstChild("BodyVelocity")
        self.gyro = fish:FindFirstChild("BodyGyro")
    
        if not self.root or not self.velocity or not self.gyro then
            warn("Fish parts missing!")
            return nil
        end
    
        self.maxSpeed = 50
        self.acceleration = 100
        self.turnSpeed = 5
    
        return self
    end
    
    function FishController:move(direction, upForce)
        -- Calculate movement direction
        local moveDirection = direction.Unit * self.maxSpeed
    
        -- Apply velocity
        self.velocity.Velocity = Vector3.new(moveDirection.X, moveDirection.Y + upForce, moveDirection.Z)
    
        -- Rotate the fish to face movement direction
        if direction.Magnitude > 0 then
            self.gyro.CFrame = CFrame.new(self.root.Position, self.root.Position + direction)
        end
    end
    
    function FishController:stop()
        self.velocity.Velocity = Vector3.new(0, 0, 0)
    end
    
    return FishController
    

    👤 Player Setup

    Now let's set up the player:

    1. In StarterPlayer > StarterCharacterScripts, create a LocalScript named "CharacterSetup"
    2. Here's the code to replace the player with our fish:
    -- CharacterSetup LocalScript
    local Players = game:GetService("Players")
    local ReplicatedStorage = game:GetService("ReplicatedStorage")
    
    local player = Players.LocalPlayer
    local character = script.Parent.Parent
    
    -- Wait for character to load
    character:WaitForChild("Humanoid")
    
    -- Remove the default character
    character:Destroy()
    
    -- Load our fish model
    local fishModel = ReplicatedStorage.FishModels:FindFirstChild("SmallFish"):Clone()
    fishModel.Parent = workspace
    
    -- Set the fish as the player's character
    player.Character = fishModel
    

    🎮 Input Handling

    1. In StarterPlayer > StarterPlayerScripts, create a LocalScript named "PlayerController"
    2. Here's the input handling code:
    -- PlayerController LocalScript
    local UserInputService = game:GetService("UserInputService")
    local RunService = game:GetService("RunService")
    local ReplicatedStorage = game:GetService("ReplicatedStorage")
    
    local player = game.Players.LocalPlayer
    local character = player.Character or player.CharacterAdded:Wait()
    local root = character:WaitForChild("HumanoidRootPart")
    local fishController = require(ReplicatedStorage.FishController).new(character)
    
    local moveDirection = Vector3.new(0, 0, 0)
    local upForce = 0
    
    -- Input handling
    UserInputService.InputBegan:Connect(function(input, gameProcessed)
        if gameProcessed then return end
    
        if input.KeyCode == Enum.KeyCode.W then
            moveDirection = moveDirection + Vector3.new(0, 0, -1)
        elseif input.KeyCode == Enum.KeyCode.S then
            moveDirection = moveDirection + Vector3.new(0, 0, 1)
        elseif input.KeyCode == Enum.KeyCode.A then
            moveDirection = moveDirection + Vector3.new(-1, 0, 0)
        elseif input.KeyCode == Enum.KeyCode.D then
            moveDirection = moveDirection + Vector3.new(1, 0, 0)
        elseif input.KeyCode == Enum.KeyCode.Space then
            upForce = 10
        elseif input.KeyCode == Enum.KeyCode.LeftShift then
            upForce = -10
        end
    end)
    
    UserInputService.InputEnded:Connect(function(input, gameProcessed)
        if gameProcessed then return end
    
        if input.KeyCode == Enum.KeyCode.W then
            moveDirection = moveDirection - Vector3.new(0, 0, -1)
        elseif input.KeyCode == Enum.KeyCode.S then
            moveDirection = moveDirection - Vector3.new(0, 0, 1)
        elseif input.KeyCode == Enum.KeyCode.A then
            moveDirection = moveDirection - Vector3.new(-1, 0, 0)
        elseif input.KeyCode == Enum.KeyCode.D then
            moveDirection = moveDirection - Vector3.new(1, 0, 0)
        elseif input.KeyCode == Enum.KeyCode.Space then
            upForce = 0
        elseif input.KeyCode == Enum.KeyCode.LeftShift then
            upForce = 0
        end
    end)
    
    -- Game loop for movement
    RunService.Heartbeat:Connect(function()
        fishController:move(moveDirection, upForce)
    
        -- Apply water resistance
        local waterPart = workspace:FindFirstChild("WaterPart")
        if waterPart and root then
            local distance = (root.Position - waterPart.Position).Magnitude
            if distance < waterPart.Size.Y / 2 then
                -- Apply buoyancy
                fishController:move(Vector3.new(0, 1, 0), 5)
            end
        end
    end)
    

    🐟 Spawning Fish

    1. In ServerScriptService, create a Script named "FishSpawner"
    2. Here's the spawning code:
    -- FishSpawner Script
    local ReplicatedStorage = game:GetService("ReplicatedStorage")
    local Players = game:GetService("Players")
    
    local fishModel = ReplicatedStorage.FishModels:FindFirstChild("SmallFish")
    
    local function spawnFish(position)
        if not fishModel then
            warn("Fish model not found!")
            return
        end
    
        local fish = fishModel:Clone()
        fish:SetPrimaryPartCFrame(CFrame.new(position))
        fish.Parent = workspace
    
        return fish
    end
    
    -- Spawn initial player fish
    Players.PlayerAdded:Connect(function(player)
        local character = player.Character or player.CharacterAdded:Wait()
        spawnFish(Vector3.new(math.random(-200, 200), 75, math.random(-200, 200)))
    end)
    
    -- Spawn some AI fish
    for i = 1, 10 do
        spawnFish(Vector3.new(math.random(-200, 200), 75, math.random(-200, 200)))
    end
    

    🎯 Game Manager

    1. In ServerScriptService, create a Script named "GameManager"
    2. Here's the basic game manager:
    -- GameManager Script
    local Players = game:GetService("Players")
    local ReplicatedStorage = game:GetService("ReplicatedStorage")
    
    local gameSettings = require(ReplicatedStorage.GameSettings)
    
    local function onPlayerAdded(player)
        -- Set up player-specific things here
        print(player.Name .. " joined the game!")
    end
    
    Players.PlayerAdded:Connect(onPlayerAdded)
    
    -- Game loop
    while true do
        -- Update game state here
        wait(1)
    end
    

    🍽️ Eating Mechanics

    Let's add the eating mechanics:

    1. In ReplicatedStorage, create a ModuleScript named "GameSettings"
    2. Here's the settings:
    -- GameSettings ModuleScript
    local GameSettings = {}
    
    GameSettings.FoodSize = 1
    GameSettings.FoodValue = 10
    GameSettings.FishGrowthRate = 0.1
    GameSettings.MaxFishSize = 10
    
    return GameSettings
    
    1. In ServerScriptService, create a Script named "FoodSpawner"
    2. Here's the food spawning code:
    -- FoodSpawner Script
    local ReplicatedStorage = game:GetService("ReplicatedStorage")
    local gameSettings = require(ReplicatedStorage.GameSettings)
    
    local function spawnFood(position)
        local food = Instance.new("Part")
        food.Size = Vector3.new(gameSettings.FoodSize, gameSettings.FoodSize, gameSettings.FoodSize)
        food.Position = position
        food.Anchored = true
        food.CanCollide = true
        food.Material = Enum.Material.Neon
        food.Color = Color3.fromRGB(255, 255, 0)
        food.Parent = workspace
    
        return food
    end
    
    -- Spawn food periodically
    while true do
        spawnFood(Vector3.new(
            math.random(-200, 200),
            math.random(50, 100),
            math.random(-200, 200)
        ))
        wait(5)
    end
    
    1. Now let's add the eating detection. In the FishSpawner script, add this:
    -- Add this to the FishSpawner script
    local function setupEating(fish)
        local root = fish:FindFirstChild("HumanoidRootPart")
        if not root then return end
    
        local function checkForFood()
            local hit, position = workspace:FindPartOnRay(
                Ray.new(root.Position, root.CFrame.LookVector * 5),
                false,
                fish
            )
    
            if hit and hit:IsA("BasePart") and hit.Color == Color3.fromRGB(255, 255, 0) then
                -- Eat the food
                hit:Destroy()
    
                -- Grow the fish
                local scale = fish:GetPrimaryPartCFrame().LookVector * 0.1
                fish:Scale(scale)
    
                -- You could add points or other rewards here
            end
        end
    
        game:GetService("RunService").Heartbeat:Connect(checkForFood)
    end
    
    -- Modify the spawnFish function to include this:
    local function spawnFish(position)
        -- ... existing code ...
    
        setupEating(fish)
        return fish
    end
    

    🎨 Visual Effects

    Let's add some nice visual effects:

    1. In ReplicatedStorage, create a ModuleScript named "VisualEffects"
    2. Here's some basic effects:
    -- VisualEffects ModuleScript
    local VisualEffects = {}
    
    function VisualEffects.createBubble(position)
        local bubble = Instance.new("Part")
        bubble.Size = Vector3.new(1, 1, 1)
        bubble.Anchored = true
        bubble.CanCollide = false
        bubble.Material = Enum.Material.Neon
        bubble.Color = Color3.fromRGB(173, 216, 230)
        bubble.Transparency = 0.5
        bubble.Parent = workspace
    
        local bodyVelocity = Instance.new("BodyVelocity")
        bodyVelocity.Velocity = Vector3.new(0, 5, 0)
        bodyVelocity.MaxForce = Vector3.new(0, math.huge, 0)
        bodyVelocity.Parent = bubble
    
        game:GetService("Debris"):AddItem(bubble, 2)
    
        return bubble
    end
    
    return VisualEffects
    
    1. Now let's use these effects in our fish. Add this to the PlayerController LocalScript:
    -- Add to PlayerController LocalScript
    local visualEffects = require(ReplicatedStorage.VisualEffects)
    
    -- Add this to the Heartbeat connection
    RunService.Heartbeat:Connect(function()
        -- ... existing code ...
    
        -- Create bubbles when moving
        if moveDirection.Magnitude > 0 then
            visualEffects.createBubble(root.Position + Vector3.new(0, -2, 0))
        end
    end)
    

    🎯 Next Steps

    You now have a basic 3D fish game with:

    • Player movement in 3D space
    • Water physics
    • Food spawning and eating
    • Basic visual effects

    To expand your game, consider adding:

    1. AI Fish Behavior: Make AI fish swim around and avoid players
    2. Evolution System: Let fish grow and change forms
    3. Scoring System: Track points and high scores
    4. UI Elements: Health, size, score displays
    5. Sound Effects: Bubbles, eating sounds
    6. Mobile Controls: Touch controls for mobile players

    Remember, the key to learning is to experiment! Try changing values, adding new features, and seeing what happens. If something breaks, that's okay - it's how we learn!

    Would you like me to explain any part in more detail or help you with any of these expansion ideas? 😊

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

Identical first prompt

Hey ChatGPT! I'm making a Roblox game inspired by fish games like Fish Eat Getting Big… · The Chat Archive