๐Ÿดโ€โ˜ ๏ธ My First Roblox Studio Game ยท Episode 7 of 7 ยท See All Episodes
๐Ÿดโ€โ˜ ๏ธ Roblox Studio ยท Beginner ยท No Experience Needed

Build a Pirate Game
in Roblox Studio

Sail the seas, fire cannons in boat battles, and land on islands to find treasure. Build a full multiplayer pirate adventure from scratch!

๐Ÿ‘ถ Ages 8+ โฑ๏ธ ~3 Hours ๐ŸŽฎ Roblox Studio โœ“ Free
๐Ÿงฑ 3D Building ๐Ÿ“œ Lua Scripting โš™๏ธ Physics ๐Ÿ’ฅ Game Mechanics โš”๏ธ Multiplayer ๐Ÿ† Publishing
โญ
0 XP
Level 1
๐Ÿ”ฅ0
Your Progress 0 / 7 steps
1
๐Ÿ—บ๏ธ
Set Up Your Pirate World
Install Roblox Studio, learn the interface, and create your ocean
Active
๐ŸŽฏ
Goal for this step

Get Roblox Studio open, learn to navigate the 3D viewport, flood the baseplate with ocean water, and save your place.

๐Ÿ‘จโ€๐Ÿ‘ง
Parent note: Roblox Studio is a free download from roblox.com. Accounts for under-13s have extra safety settings managed by a parent account. It's worth checking the account's privacy settings before publishing anything publicly later.

Install Roblox Studio & start a place

  • 1Go to roblox.com, sign in (or create a free account), then click Create.
  • 2If prompted, download and install Roblox Studio, it's free.
  • 3Once Studio opens, choose the Baseplate template, a flat grey block to build on.
  • 4Click Create to open your new place.
๐Ÿ’ก
The Baseplate is just a big grey block, we'll replace most of it with ocean and islands, so don't worry about it looking boring right now!

Find your way around Studio

  • 1Viewport, the big 3D area in the middle. This is your game world.
  • 2Explorer (right side), a list of everything in your game, like folders and files.
  • 3Properties (below Explorer), settings for whatever you have selected.
  • 4Hold Right Mouse Button and move the mouse to look around. While holding it, press W A S D to fly.
  • 5Scroll the Mouse Wheel to zoom. Press Q/E to fly down/up.

Turn the baseplate into ocean

  • 1Click the Terrain tab at the top of Studio.
  • 2Click Edit to open the Terrain Editor panel.
  • 3Choose the Add tool, set the material to Water, and pick a large brush size.
  • 4Click and drag across the baseplate to flood a large area with water.
โš ๏ธ
Terrain water is special. Anything that touches Water and is unanchored will naturally bob and float, this is exactly what makes our ship float later, with no extra scripting!

Save your place

  • 1Press Ctrl + S. Choose Save to Roblox.
  • 2Name your place "My Pirate Game" and click Save.
๐Ÿ’ก
Get into the habit of saving with Ctrl + S every time you finish a step, Studio doesn't always autosave!
โœ๏ธ
Fill in the Blanks
+15 XP
The panel lists everything in your game. The panel shows settings for the selected object.
๐Ÿง 
Knowledge Check
+15 XP
Why does Roblox's Terrain Water make our ship float automatically?
AYou have to write a special floating script first
BWater only works if you anchor every part
CUnanchored parts touching Terrain Water automatically bob and float
2
๐Ÿšข
Build a Pirate Ship
Construct a hull, deck, masts and sails from Parts, then add a driver's seat
Locked
๐ŸŽฏ
Goal for this step

Build a complete pirate ship from basic Parts, hull, deck, mast, sails, group it into a Model, and add a VehicleSeat so a player can sit in it.

๐Ÿ‘จโ€๐Ÿ‘ง
Parent note: Don't aim for perfection, a boxy hull with two wedges already reads as "boat" once it's in water. The goal is to learn Parts, grouping and seats; detailing can always be added later.

Build the hull

  • 1Go to Home tab, click Part โ†’ Block. A block appears in your world.
  • 2Use the Scale tool or Properties to stretch it: Size X=6, Y=4, Z=20.
  • 3Set BrickColor to a wood colour like "Reddish brown".
  • 4Insert a Wedge part, scale it to match, and place at the front for a pointed bow.
  • 5Duplicate the wedge (Ctrl + D), rotate 180ยฐ and place at the back for the stern.

Add deck, mast & sails

  • 1Insert a Block, flatten it (low Y, wide X/Z) and place on top of the hull as a deck.
  • 2Insert a Cylinder, rotate it upright, and stretch it tall, this is the mast.
  • 3Insert a thin Block, colour it white, and hang it from the mast, that's a sail.
  • 4Duplicate the mast + sail combo and place a second one further along the deck.

Group into a Model & add a seat

  • 1Select all ship parts, press Ctrl + G to group them into a Model.
  • 2Rename the Model to "PirateShip". Set PrimaryPart to the hull block.
  • 3Insert a VehicleSeat and place it on the deck. Make sure it's inside your PirateShip Model.
  • 4Add a WeldConstraint between the seat and the deck, and between every major part and the hull.
โš ๏ธ
Without welds, once the ship is unanchored, every part floats off on its own! WeldConstraints keep your ship in one piece.
๐Ÿ”ข
Put It In Order
+15 XP
Click these ship-building steps in the correct order:
Select all parts and press Ctrl + G to group into a Model
Insert a Block part and scale it into a hull shape
Add a VehicleSeat and weld it to the deck
Add wedges for the bow and stern, deck, mast and sails
๐Ÿง 
Knowledge Check
+15 XP
What does setting PrimaryPart on a Model do?
AIt deletes all other parts in the Model
BIt tells Roblox which part is the anchor point of the whole model
CIt changes the colour of the model
3
โš™๏ธ
Sailing Scripts, Make It Move!
Write your first Lua script so the ship floats and players can steer it
Locked
๐ŸŽฏ
Goal for this step

Make the ship float on the ocean, then write a Lua script so players can steer it with W/A/S/D.

Scripts 101: where code lives

  • 1A Script runs on the server, use it for movement, damage, scoring.
  • 2A LocalScript runs on each player's device, used for GUIs and camera effects.
  • 3Right-click an object in Explorer โ†’ Insert Object โ†’ Script to add one.
  • 4Press F5 to test, then check View โ†’ Output for errors.

Make the ship float

  • 1Select every part of the ship. In Properties, make sure Anchored = false for all parts.
  • 2Position the ship above the water surface, not underneath it.
  • 3Press F5 to test, the ship should drop slightly and settle, floating on the water!
โš ๏ธ
If a part drifts away, you forgot a WeldConstraint! Go back to Step 2 and weld it to the hull.

Script the steering controls

  • 1Select the VehicleSeat in Explorer.
  • 2Right-click โ†’ Insert Object โ†’ Script.
  • 3Delete the default text and paste in the script below:
-- Sailing controller: turns Throttle/Steer into ship movement local seat = script.Parent local ship = seat.Parent local hull = ship.PrimaryPart local FORCE = Vector3.new(0, 0, 4000) local TURN_SPEED = 1.5 local bodyVel = Instance.new("BodyVelocity") bodyVel.MaxForce = Vector3.new(4000, 0, 4000) bodyVel.Velocity = Vector3.new(0,0,0) bodyVel.Parent = hull local bodyGyro = Instance.new("BodyAngularVelocity") bodyGyro.MaxTorque = Vector3.new(0, 40000, 0) bodyGyro.AngularVelocity = Vector3.new(0,0,0) bodyGyro.Parent = hull game:GetService("RunService").Heartbeat:Connect(function() local forward = hull.CFrame.LookVector * (seat.Throttle * 50) bodyVel.Velocity = forward bodyGyro.AngularVelocity = Vector3.new(0, -seat.Steer * TURN_SPEED, 0) end)
๐Ÿ’ก
Press F5, walk to the VehicleSeat, press E to sit. Use W/S to sail forward/back and A/D to turn. Tweak TURN_SPEED and the * 50 multiplier to change how the ship feels.
๐Ÿ‘จโ€๐Ÿ‘ง
Parent note: Tuning numbers like this, change a value, test, repeat, is exactly how professional game developers "feel out" controls. Encourage experimenting!
โšก
True or False?
+15 XP
A Script runs on the server and is used for game logic like movement.
You must write a special floating script to make parts float on Terrain Water.
VehicleSeats automatically read W/A/S/D as Throttle and Steer values.
๐Ÿ’ป
Code Challenge
+20 XP
Fill in the blanks to create the steering controller:
local forward = hull.CFrame. * (seat.Throttle * 50) bodyVel.Velocity = bodyGyro.AngularVelocity = Vector3.new(0, -seat. * TURN_SPEED, 0)
๐Ÿ’ก Hint: LookVector gives the direction the part faces. Throttle is forward/back, Steer is left/right.
๐Ÿง 
Knowledge Check
+15 XP
What does BodyVelocity do when placed inside a part?
AIt applies an invisible force that moves the part in a given direction
BIt anchors the part so it can't move
CIt changes the part's colour every frame
4
๐Ÿ’ฅ
Cannons & Boat Battles
Build cannons, script cannonballs, add damage, and sink enemy ships
Locked
๐ŸŽฏ
Goal for this step

Arm your ship with clickable cannons that fire cannonballs, give ships Health, and make damaged ships sink and respawn.

Build a cannon

  • 1Insert a Cylinder, rotate it sideways, and scale into a short fat tube.
  • 2Set its colour to dark grey. Name it "CannonBarrel".
  • 3Position it on the edge of the deck, pointing outward over the water.
  • 4Add a WeldConstraint between the cannon and the hull.
  • 5Right-click the cannon โ†’ Insert Object โ†’ ClickDetector.

Script the cannon to fire

  • 1Right-click CannonBarrel โ†’ Insert Object โ†’ Script and paste:
-- Fires a cannonball when clicked local cannon = script.Parent local click = cannon:WaitForChild("ClickDetector") local Debris = game:GetService("Debris") local COOLDOWN = 1.5 local canFire = true click.MouseClick:Connect(function(player) if not canFire then return end canFire = false local ball = Instance.new("Part") ball.Shape = Enum.PartType.Ball ball.Size = Vector3.new(1.5, 1.5, 1.5) ball.BrickColor = BrickColor.new("Really black") ball.CFrame = cannon.CFrame * CFrame.new(0, 0, -3) ball.Parent = workspace local bv = Instance.new("BodyVelocity") bv.MaxForce = Vector3.new(math.huge, math.huge, math.huge) bv.Velocity = cannon.CFrame.LookVector * -120 bv.Parent = ball Debris:AddItem(ball, 5) task.wait(COOLDOWN) canFire = true end)

Add damage & sinking

  • 1Select PirateShip Model โ†’ Insert Object โ†’ NumberValue, name it "Health", set Value to 100.
  • 2Add a Touched event on each cannonball that reduces the hit ship's Health by 15.
  • 3Add a script that watches Health, when it hits 0, tween all parts downward to "sink", wait 4 seconds, then reset to the starting position.
๐Ÿ’ก
Duplicate your whole PirateShip (Ctrl + D), move the copy away, and fire from one at the other to test damage!
๐Ÿ‘จโ€๐Ÿ‘ง
Parent note: This is the first "game loop" moment, damage leads to sinking and a reset. It's the same pattern used in almost every multiplayer game.
๐Ÿ’ป
Code Challenge
+20 XP
Fill in the blanks for the cannonball damage script:
ball.:Connect(function(hit) local hitModel = hit:FindFirstAncestorOfClass("") if hitModel and hitModel:FindFirstChild("Health") then hitModel.Health.Value = hitModel.Health.Value - end end)
๐Ÿ’ก Hint: The event fires when the ball touches something. We look for the Model ancestor, and subtract 15 damage.
๐Ÿ”ฎ
Predict What Happens
+15 XP
A ship has Health = 100. It gets hit by 7 cannonballs, each dealing 15 damage.

What is the ship's Health afterwards?
A15, it always stops at 15
B-5, it goes below zero (the ship sinks at hit 7)
C0, it can't go below zero
๐Ÿง 
Knowledge Check
+15 XP
What does Debris:AddItem(ball, 5) do?
AIt makes the ball explode after 5 seconds
BIt creates 5 more cannonballs
CIt automatically deletes the ball after 5 seconds to keep the game clean
5
๐Ÿ๏ธ
Islands & Treasure
Sculpt islands from the ocean, decorate them, and add lootable treasure chests
Locked
๐ŸŽฏ
Goal for this step

Use the Terrain Editor to sculpt sand-and-grass islands, decorate them, add a dock zone for ships, and place a treasure chest with a ProximityPrompt.

Sculpt an island with Terrain

  • 1Open Terrain โ†’ Edit. Select the Add tool with material Sand.
  • 2Click below the water surface to build a mound of sand poking above the waves.
  • 3Switch to Grass and add a layer on top for a grassy centre.
  • 4Use the Smooth tool to round off blocky edges.
๐Ÿ’ก
Build several islands spread around your ocean, this gives players places to sail between!

Decorate & add a dock zone

  • 1Open Toolbox and search for free models: "palm tree", "rock", "crate".
  • 2Drag them onto your island. Set Anchored = true on each decoration.
  • 3Insert a thin invisible Block along the shoreline (Transparency=1, CanCollide=true). Name it "DockZone".
  • 4Add a Script to DockZone that zeroes the ship's BodyVelocity on contact, a soft landing.

Add a treasure chest

  • 1Insert a small Block on the island, colour it gold/brown. Name it "TreasureChest".
  • 2Right-click โ†’ Insert Object โ†’ ProximityPrompt. Set ActionText to "Open Chest", HoldDuration to 1.
  • 3Add a Script that gives the player +25 Gold when triggered, then destroys the chest.
๐Ÿ‘จโ€๐Ÿ‘ง
Parent note: Browsing the Toolbox together is a good moment to talk about free community assets and why checking licences matters, even casually.
๐Ÿ”ข
Put It In Order
+15 XP
Click these island-building steps in the correct order:
Switch to Grass and add a layer on top of the sand
Add a ProximityPrompt to a treasure chest
Use the Add tool with Sand material to build a mound
Decorate the island with palm trees and rocks
๐Ÿง 
Knowledge Check
+15 XP
What does a ProximityPrompt do?
AIt shows a "Press E" prompt when a player walks close, and triggers a script on interaction
BIt makes a part glow brightly
CIt deletes the part when a player gets near
6
โš”๏ธ
Crews, Spawns & Leaderboards
Set up pirate crews, team spawn points, and a Gold/ShipsSunk scoreboard
Locked
๐ŸŽฏ
Goal for this step

Create two pirate crews with team colours, give each crew their own spawn point and ship, and build a leaderboard that tracks Gold and ShipsSunk.

Create pirate crews (Teams)

  • 1In Explorer, find Teams. Right-click โ†’ Insert Object โ†’ Team.
  • 2Name it "Red Crew", set TeamColor to "Bright red".
  • 3Insert a second Team: "Blue Crew", TeamColor "Bright blue".
  • 4Tick AutoAssignable on both teams.

Add spawn points for each crew

  • 1Insert a SpawnLocation near the red ship's dock. Set TeamColor to "Bright red", Neutral = false.
  • 2Insert another near the blue ship. Set TeamColor to "Bright blue", Neutral = false.

Build a leaderboard

  • 1In Explorer, find ServerScriptService. Insert a Script named "LeaderboardSetup".
  • 2Paste this code:
-- Gives every player Gold and ShipsSunk stats game.Players.PlayerAdded:Connect(function(player) local leaderstats = Instance.new("Folder") leaderstats.Name = "leaderstats" leaderstats.Parent = player local gold = Instance.new("IntValue") gold.Name = "Gold" gold.Value = 0 gold.Parent = leaderstats local sunk = Instance.new("IntValue") sunk.Name = "ShipsSunk" sunk.Value = 0 sunk.Parent = leaderstats end)
๐Ÿ’ก
Press F5 then Tab, you should see your name with "Gold: 0" and "ShipsSunk: 0". Opening treasure chests from Step 5 will now correctly add Gold!
โšก
True or False?
+15 XP
AutoAssignable means Roblox automatically splits players between teams.
The leaderboard folder must be named "stats" for Roblox to display it.
SpawnLocations with Neutral = false only spawn players who match that team colour.
โœ๏ธ
Fill in the Blanks
+15 XP
The leaderboard folder must be named . Each stat inside it is an .
๐Ÿง 
Knowledge Check
+15 XP
Where should the LeaderboardSetup script be placed?
AInside the PirateShip Model
BIn ServerScriptService
CInside StarterGui
7
๐Ÿ†
Polish & Publish
Add sound effects, a health bar, playtest with friends, and publish your game
Locked
๐ŸŽฏ
Goal for this step

Add cannon sounds and ocean ambience, build an on-screen health bar, test with multiple players, and publish your pirate game to Roblox!

Add sound effects

  • 1Open Toolbox โ†’ Audio, search for "cannon". Drag a free cannon sound into CannonBarrel.
  • 2In the cannon script, add after creating the ball: cannon:FindFirstChildOfClass("Sound"):Play()
  • 3For ambient ocean sound, drag an "ocean waves" audio into Workspace. Set Looped = true, Playing = true, Volume = 0.3.

Build a health bar (ScreenGui)

  • 1In StarterGui, insert a ScreenGui.
  • 2Add a Frame (background bar, Size {0,200},{0,24}, dark grey).
  • 3Inside it, add another Frame named "Fill" (green, Size {1,0},{1,0}).
  • 4Add a LocalScript that updates the Fill's width based on the ship's Health value.

Playtest with friends

  • 1Click the dropdown next to Play โ†’ choose Local Server with 2 players.
  • 2Studio opens multiple game windows. Test: do both crews spawn correctly? Can both ships take damage?

Publish your game!

  • 1Save with Ctrl + S.
  • 2Go to File โ†’ Publish to Roblox. Name it, add a description and thumbnail.
  • 3Set access to Friends or Private to start. Click Create.
๐ŸŽ‰
You just built and published a full multiplayer pirate game, ships, cannons, islands, treasure, crews and a leaderboard. You're a Roblox game developer!
๐Ÿ‘จโ€๐Ÿ‘ง
Parent note: Going fully public means anyone on Roblox can join. For younger creators, review the experience's access settings before opening it beyond friends.
๐Ÿ”ข
Put It In Order
+15 XP
Click these final steps in the correct order:
Playtest with Local Server and 2 players
Add cannon sounds and ocean ambience
File โ†’ Publish to Roblox
Build a ScreenGui health bar
โšก
Final True or False!
+15 XP
A LocalScript in StarterGui runs on the server.
Setting a Sound's Looped property to true makes it repeat forever.
Local Server testing lets you simulate multiple players in Studio without publishing.
๐Ÿง 
Final Knowledge Check
+15 XP
Which script type should the health bar GUI use?
AScript (server-side)
BLocalScript (runs on the player's device)
CModuleScript
๐Ÿดโ€โ˜ ๏ธ๐Ÿšข๐Ÿ’ฅ๐Ÿ๏ธโš”๏ธ
You Built a Pirate Game!

Amazing work, you've built a full multiplayer pirate game with ships, cannons, islands, treasure, crews, and a leaderboard. You've finished the entire My First Roblox Studio Game series you're now a real Roblox developer!

0
Total XP
1
Level
0
Best Streak
0%
Accuracy
๐ŸŽฎ Back to the Series Hub โญ View My Progress & Certificates

This workshop was free and took many hours to build. If it helped you learn something new, consider supporting the project.

☕ Support on Ko-fi