In short
Write the quests as a list in a ModuleScript in ReplicatedStorage, each with a kind (Collect or Defeat), a target, an amount and a reward. A Script in ServerScriptService keeps each player's current quest and progress as attributes on the Player, adds 1 when they touch a tagged item or defeat a tagged enemy, and pays the reward when progress reaches the amount. A LocalScript in StarterGui reads the attributes and draws the quest panel.
- Count progress on the server, from things the server sees: a touch, a death. Never from a RemoteEvent that says "I collected one".
- Attributes on the Player replicate to that player, so the GUI updates by itself.
- Save the quest number and progress, or players start from quest 1 every time.
Get the script
Quest system script: collect and defeat quests
One server Script runs a chain of quests from a ModuleScript list: it counts tagged items and enemies, pays rewards, saves progress and tells the GUI.
-- Script in ServerScriptService named Quests.
-- Tracks each player's quest, counts tagged items and enemies, pays rewards and saves progress.
local CollectionService = game:GetService("CollectionService")
local DataStoreService = game:GetService("DataStoreService")
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ServerStorage = game:GetService("ServerStorage")
type Quest = {
title: string,
kind: "Collect" | "Defeat",
target: string,
amount: number,
reward: number,
}
local quests = require(ReplicatedStorage:WaitForChild("QuestConfig")) :: { Quest }
local ITEM_RESPAWN_SECONDS = 8
local STORE_NAME = "PlayerQuests_v1"
local questCompleted = Instance.new("RemoteEvent")
questCompleted.Name = "QuestCompleted"
questCompleted.Parent = ReplicatedStorage
local loaded: { [Player]: boolean } = {}
local function store(): DataStore
return DataStoreService:GetDataStore(STORE_NAME)
end
local function keyFor(player: Player): string
return "player_" .. player.UserId
end
local function giveCoins(player: Player, amount: number)
-- Use the rebirth system's AwardCoins if it exists, so its multiplier applies
local awardCoins = ServerStorage:FindFirstChild("AwardCoins")
if awardCoins and awardCoins:IsA("BindableEvent") then
awardCoins:Fire(player, amount)
return
end
local leaderstats = player:FindFirstChild("leaderstats")
local coins = leaderstats and leaderstats:FindFirstChild("Coins")
if coins and coins:IsA("IntValue") then
coins.Value += amount
end
end
local function currentQuest(player: Player): Quest?
local index = player:GetAttribute("QuestIndex")
if type(index) == "number" then
return quests[index]
end
return nil
end
-- Called by the server only, when it has seen the player do something
local function addProgress(player: Player, kind: string, target: string)
local quest = currentQuest(player)
if not quest or quest.kind ~= kind or quest.target ~= target then
return
end
local progress = (tonumber(player:GetAttribute("QuestProgress")) or 0) + 1
if progress < quest.amount then
player:SetAttribute("QuestProgress", progress)
return
end
-- Quest done: pay, tell the player, move to the next one
giveCoins(player, quest.reward)
questCompleted:FireClient(player, quest.title, quest.reward)
local index = player:GetAttribute("QuestIndex") :: number
player:SetAttribute("QuestIndex", index + 1)
player:SetAttribute("QuestProgress", 0)
end
local function playerFromPart(hit: BasePart): Player?
local character = hit.Parent
if character and character:IsA("Model") then
return Players:GetPlayerFromCharacter(character)
end
return nil
end
-- Collect quests: parts tagged QuestItem with an ItemName attribute
local function setUpItem(item: Instance)
if not item:IsA("BasePart") then
return
end
local ready = true
item.Touched:Connect(function(hit: BasePart)
local player = playerFromPart(hit)
local itemName = item:GetAttribute("ItemName")
if not (ready and player and type(itemName) == "string") then
return
end
-- Only players who need this item pick it up
local quest = currentQuest(player)
if not quest or quest.kind ~= "Collect" or quest.target ~= itemName then
return
end
ready = false
item.Transparency = 1
addProgress(player, "Collect", itemName)
task.delay(ITEM_RESPAWN_SECONDS, function()
item.Transparency = 0
ready = true
end)
end)
end
-- Defeat quests: Models tagged QuestEnemy with an EnemyName attribute and a Humanoid.
-- The player who landed the killing hit is in an ObjectValue named "creator" in the Humanoid.
local function setUpEnemy(enemy: Instance)
if not enemy:IsA("Model") then
return
end
local humanoid = enemy:FindFirstChildOfClass("Humanoid")
if not humanoid then
return
end
humanoid.Died:Connect(function()
local enemyName = enemy:GetAttribute("EnemyName")
local tag = humanoid:FindFirstChild("creator")
if type(enemyName) == "string" and tag and tag:IsA("ObjectValue") and tag.Value and tag.Value:IsA("Player") then
addProgress(tag.Value, "Defeat", enemyName)
end
end)
end
for _, item in CollectionService:GetTagged("QuestItem") do
setUpItem(item)
end
CollectionService:GetInstanceAddedSignal("QuestItem"):Connect(setUpItem)
for _, enemy in CollectionService:GetTagged("QuestEnemy") do
setUpEnemy(enemy)
end
CollectionService:GetInstanceAddedSignal("QuestEnemy"):Connect(setUpEnemy)
local function onPlayerAdded(player: Player)
local index, progress = 1, 0
local ok, data = pcall(function()
return store():GetAsync(keyFor(player))
end)
if ok then
if type(data) == "table" then
index = math.max(1, math.floor(tonumber(data.Index) or 1))
progress = math.max(0, math.floor(tonumber(data.Progress) or 0))
end
loaded[player] = true
else
warn("Could not load quests for " .. player.Name .. ": " .. tostring(data))
end
player:SetAttribute("QuestIndex", index)
player:SetAttribute("QuestProgress", progress)
end
local function save(player: Player)
if not loaded[player] then
return
end
local data = {
Index = player:GetAttribute("QuestIndex"),
Progress = player:GetAttribute("QuestProgress"),
}
local ok, err = pcall(function()
store():SetAsync(keyFor(player), data, { player.UserId })
end)
if not ok then
warn("Could not save quests for " .. player.Name .. ": " .. tostring(err))
end
end
Players.PlayerAdded:Connect(onPlayerAdded)
for _, player in Players:GetPlayers() do
task.spawn(onPlayerAdded, player)
end
Players.PlayerRemoving:Connect(function(player: Player)
save(player)
loaded[player] = nil
end)
game:BindToClose(function()
local pending = 0
for _, player in Players:GetPlayers() do
pending += 1
task.spawn(function()
save(player)
pending -= 1
end)
end
while pending > 0 do
task.wait()
end
end)
RoCode builds it in the place you have open in Roblox Studio, on Windows or macOS with a desktop browser; on a phone the button sends the prompt and the link to your computer. Free to start, with free credits every day. More Roblox Studio scripts
Where to put it
ReplicatedStorage
QuestConfig ModuleScript new
QuestCompleted RemoteEvent (made by the script)
ServerScriptService
Quests Script new
StarterGui
QuestPanel LocalScript new
Workspace
Apple Part (tag: QuestItem, attribute ItemName = "Apple")
Slime Model (tag: QuestEnemy, attribute EnemyName = "Slime")
Settings you can change
ItemNameAttribute- On each part tagged QuestItem: the name a Collect quest counts, such as
Apple. Default: none. EnemyNameAttribute- On each Model tagged QuestEnemy: the name a Defeat quest counts, such as
Slime. Default: none. ITEM_RESPAWN_SECONDSIn the script- Seconds before a collected item can be picked up again. Default:
8.
The quests themselves are in the QuestConfig ModuleScript (Step 1). Enemies only count when the hit that killed them was tagged with the player, which most weapon scripts do (Step 4).
What a cheater can and cannot doProgress only goes up when the server sees a touch or an enemy's death, so a cheater cannot fire a remote to finish a quest. A cheater can still move their character to items, which is why each item has a cooldown.
Type-checked with luau-lsp strict against Roblox's API definitions on 14 November 2026. Not playtested in Studio yet: press Play and watch the Output window before you publish.
Prompt for RoCode
Add a quest system to my game: a QuestConfig ModuleScript in ReplicatedStorage with a chain of quests (collect 5 Apples, defeat 3 Slimes) and coin rewards, one Script in ServerScriptService that tracks each player's quest and progress as attributes, counts parts tagged QuestItem and enemies tagged QuestEnemy killed by that player, pays the reward, saves progress in a data store, and a quest panel LocalScript that shows the current quest and a progress bar.
On this page
How a quest system works
Every quest is a goal of the form do this thing to this target, this many times. That fits in four fields, so a list of quests is just a table:
| Kind | Counts when | Example |
|---|---|---|
| Collect | The player touches a part tagged QuestItem whose ItemName matches | Collect 5 Apples |
| Defeat | An enemy tagged QuestEnemy whose EnemyName matches dies, and the player landed the last hit | Defeat 3 Slimes |
The server holds two numbers per player: which quest they are on (QuestIndex) and how far along it they are (QuestProgress). It writes them as attributes on the Player, which Roblox copies to that player's game, so the quest panel reads them without any extra remote. When progress reaches the amount, the server pays the reward and moves to the next quest.
Step 1: Write the quest list
- Hover over ReplicatedStorage, click + and insert a ModuleScript. Name it
QuestConfig. - Replace its contents with the list below. Players do the quests in this order.
-- ModuleScript in ReplicatedStorage named QuestConfig.
-- The quests, in the order players do them. The server and the quest panel both read this.
export type Quest = {
title: string,
kind: "Collect" | "Defeat",
target: string, -- the ItemName or EnemyName that counts
amount: number,
reward: number, -- coins
}
local quests: { Quest } = {
{ title = "Collect 5 Apples", kind = "Collect", target = "Apple", amount = 5, reward = 50 },
{ title = "Defeat 3 Slimes", kind = "Defeat", target = "Slime", amount = 3, reward = 100 },
{ title = "Collect 10 Crystals", kind = "Collect", target = "Crystal", amount = 10, reward = 200 },
{ title = "Defeat the Slime King", kind = "Defeat", target = "SlimeKing", amount = 1, reward = 500 },
}
return quests
It lives in ReplicatedStorage so the quest panel can show the title and amount. That is fine: knowing the quests does not help anyone cheat, because only the server changes progress. Add as many quests as you like; when a player finishes the last one, the panel says "All quests done".
Step 2: The quest script
This Script tracks progress, counts items and enemies, pays rewards and saves. Rewards go to a Coins value in leaderstats. If you made the rebirth system, it uses its AwardCoins event instead so the multiplier applies.
- Hover over ServerScriptService, click + and insert a Script named
Quests. - Paste the code below.
-- Script in ServerScriptService named Quests.
-- Tracks each player's quest, counts tagged items and enemies, pays rewards and saves progress.
local CollectionService = game:GetService("CollectionService")
local DataStoreService = game:GetService("DataStoreService")
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ServerStorage = game:GetService("ServerStorage")
type Quest = {
title: string,
kind: "Collect" | "Defeat",
target: string,
amount: number,
reward: number,
}
local quests = require(ReplicatedStorage:WaitForChild("QuestConfig")) :: { Quest }
local ITEM_RESPAWN_SECONDS = 8
local STORE_NAME = "PlayerQuests_v1"
local questCompleted = Instance.new("RemoteEvent")
questCompleted.Name = "QuestCompleted"
questCompleted.Parent = ReplicatedStorage
local loaded: { [Player]: boolean } = {}
local function store(): DataStore
return DataStoreService:GetDataStore(STORE_NAME)
end
local function keyFor(player: Player): string
return "player_" .. player.UserId
end
local function giveCoins(player: Player, amount: number)
-- Use the rebirth system's AwardCoins if it exists, so its multiplier applies
local awardCoins = ServerStorage:FindFirstChild("AwardCoins")
if awardCoins and awardCoins:IsA("BindableEvent") then
awardCoins:Fire(player, amount)
return
end
local leaderstats = player:FindFirstChild("leaderstats")
local coins = leaderstats and leaderstats:FindFirstChild("Coins")
if coins and coins:IsA("IntValue") then
coins.Value += amount
end
end
local function currentQuest(player: Player): Quest?
local index = player:GetAttribute("QuestIndex")
if type(index) == "number" then
return quests[index]
end
return nil
end
-- Called by the server only, when it has seen the player do something
local function addProgress(player: Player, kind: string, target: string)
local quest = currentQuest(player)
if not quest or quest.kind ~= kind or quest.target ~= target then
return
end
local progress = (tonumber(player:GetAttribute("QuestProgress")) or 0) + 1
if progress < quest.amount then
player:SetAttribute("QuestProgress", progress)
return
end
-- Quest done: pay, tell the player, move to the next one
giveCoins(player, quest.reward)
questCompleted:FireClient(player, quest.title, quest.reward)
local index = player:GetAttribute("QuestIndex") :: number
player:SetAttribute("QuestIndex", index + 1)
player:SetAttribute("QuestProgress", 0)
end
local function playerFromPart(hit: BasePart): Player?
local character = hit.Parent
if character and character:IsA("Model") then
return Players:GetPlayerFromCharacter(character)
end
return nil
end
-- Collect quests: parts tagged QuestItem with an ItemName attribute
local function setUpItem(item: Instance)
if not item:IsA("BasePart") then
return
end
local ready = true
item.Touched:Connect(function(hit: BasePart)
local player = playerFromPart(hit)
local itemName = item:GetAttribute("ItemName")
if not (ready and player and type(itemName) == "string") then
return
end
-- Only players who need this item pick it up
local quest = currentQuest(player)
if not quest or quest.kind ~= "Collect" or quest.target ~= itemName then
return
end
ready = false
item.Transparency = 1
addProgress(player, "Collect", itemName)
task.delay(ITEM_RESPAWN_SECONDS, function()
item.Transparency = 0
ready = true
end)
end)
end
-- Defeat quests: Models tagged QuestEnemy with an EnemyName attribute and a Humanoid.
-- The player who landed the killing hit is in an ObjectValue named "creator" in the Humanoid.
local function setUpEnemy(enemy: Instance)
if not enemy:IsA("Model") then
return
end
local humanoid = enemy:FindFirstChildOfClass("Humanoid")
if not humanoid then
return
end
humanoid.Died:Connect(function()
local enemyName = enemy:GetAttribute("EnemyName")
local tag = humanoid:FindFirstChild("creator")
if type(enemyName) == "string" and tag and tag:IsA("ObjectValue") and tag.Value and tag.Value:IsA("Player") then
addProgress(tag.Value, "Defeat", enemyName)
end
end)
end
for _, item in CollectionService:GetTagged("QuestItem") do
setUpItem(item)
end
CollectionService:GetInstanceAddedSignal("QuestItem"):Connect(setUpItem)
for _, enemy in CollectionService:GetTagged("QuestEnemy") do
setUpEnemy(enemy)
end
CollectionService:GetInstanceAddedSignal("QuestEnemy"):Connect(setUpEnemy)
local function onPlayerAdded(player: Player)
local index, progress = 1, 0
local ok, data = pcall(function()
return store():GetAsync(keyFor(player))
end)
if ok then
if type(data) == "table" then
index = math.max(1, math.floor(tonumber(data.Index) or 1))
progress = math.max(0, math.floor(tonumber(data.Progress) or 0))
end
loaded[player] = true
else
warn("Could not load quests for " .. player.Name .. ": " .. tostring(data))
end
player:SetAttribute("QuestIndex", index)
player:SetAttribute("QuestProgress", progress)
end
local function save(player: Player)
if not loaded[player] then
return
end
local data = {
Index = player:GetAttribute("QuestIndex"),
Progress = player:GetAttribute("QuestProgress"),
}
local ok, err = pcall(function()
store():SetAsync(keyFor(player), data, { player.UserId })
end)
if not ok then
warn("Could not save quests for " .. player.Name .. ": " .. tostring(err))
end
end
Players.PlayerAdded:Connect(onPlayerAdded)
for _, player in Players:GetPlayers() do
task.spawn(onPlayerAdded, player)
end
Players.PlayerRemoving:Connect(function(player: Player)
save(player)
loaded[player] = nil
end)
game:BindToClose(function()
local pending = 0
for _, player in Players:GetPlayers() do
pending += 1
task.spawn(function()
save(player)
pending -= 1
end)
end
while pending > 0 do
task.wait()
end
end)
The parts that matter
- addProgress is the only function that moves a quest forward, and only server code calls it. It ignores anything that does not match the current quest, so collecting a crystal during the apple quest does nothing.
- Items only react to players who need them, hide for a few seconds and come back. Another player on a different quest walks straight through.
- QuestIndex past the end means every quest is done.
quests[index]is then nil and nothing counts. - Saving follows the same rule as every guide here: a player whose data failed to load is not saved, so an outage cannot reset them to quest 1.
Step 3: Set up items to collect
- Insert a Part (or a MeshPart for a real apple) in Workspace. Tick Anchored, and untick CanCollide so players walk through it.
- In the Properties window, scroll to Tags, click + and type
QuestItem. - Scroll to Attributes, click +, name it
ItemName, pick string and typeApple. - Duplicate it (Ctrl+D) and spread copies around the map. Make crystals the same way with ItemName
Crystal.
The ItemName must match the quest's target exactly, capital letters included. An item that is a Model rather than a Part will not work as it is: tag the main part inside it instead.
Step 4: Set up enemies to defeat
An enemy is any Model with a Humanoid, tagged QuestEnemy with an EnemyName attribute such as Slime. The NPC pathfinding guide builds one that chases players.
The tricky part is knowing who defeated it. The usual Roblox convention is that a weapon puts an ObjectValue named creator inside the Humanoid it hits, with its Value set to the attacking Player. When the Humanoid dies, the Quests script reads that tag. If your weapon does not do this yet, add this ModuleScript and call it from the weapon's server script just before it deals damage, with require(ServerScriptService.CreatorTag)(humanoid, player):
-- ModuleScript in ServerScriptService named CreatorTag.
-- Weapons call it before dealing damage: require(ServerScriptService.CreatorTag)(humanoid, player)
local Debris = game:GetService("Debris")
local TAG_SECONDS = 2 -- the hit counts for this long
local function tagHumanoid(humanoid: Humanoid, attacker: Player)
local old = humanoid:FindFirstChild("creator")
if old then
old:Destroy()
end
local tag = Instance.new("ObjectValue")
tag.Name = "creator"
tag.Value = attacker
tag.Parent = humanoid
Debris:AddItem(tag, TAG_SECONDS)
end
return tagHumanoid
The tag removes itself after 2 seconds, so an enemy that falls off the map a minute later does not count for whoever hit it last. The sword and kill feed guides use the same tag, so a sword from there already works with these quests.
Step 5: The quest panel
The panel sits in the top-left corner: the quest title, "3 / 5", a progress bar, and a short "Quest complete" message when the server says so. It builds itself in code.
- Hover over StarterGui, click + and insert a LocalScript named
QuestPanel. - Paste the code below.
-- LocalScript in StarterGui named QuestPanel.
-- Shows the current quest from the attributes the server sets. It never changes progress.
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local TweenService = game:GetService("TweenService")
type Quest = {
title: string,
kind: "Collect" | "Defeat",
target: string,
amount: number,
reward: number,
}
local quests = require(ReplicatedStorage:WaitForChild("QuestConfig")) :: { Quest }
local questCompleted = ReplicatedStorage:WaitForChild("QuestCompleted") :: RemoteEvent
local player = Players.LocalPlayer
local gui = Instance.new("ScreenGui")
gui.Name = "QuestGui"
gui.ResetOnSpawn = false
local panel = Instance.new("Frame")
panel.Position = UDim2.fromOffset(16, 80)
panel.Size = UDim2.fromOffset(240, 74)
panel.BackgroundColor3 = Color3.fromRGB(25, 25, 35)
panel.BackgroundTransparency = 0.15
panel.Parent = gui
Instance.new("UICorner").Parent = panel
local title = Instance.new("TextLabel")
title.Position = UDim2.fromOffset(12, 8)
title.Size = UDim2.new(1, -24, 0, 22)
title.BackgroundTransparency = 1
title.TextXAlignment = Enum.TextXAlignment.Left
title.TextColor3 = Color3.new(1, 1, 1)
title.Font = Enum.Font.GothamBold
title.TextSize = 16
title.Parent = panel
local count = Instance.new("TextLabel")
count.Position = UDim2.fromOffset(12, 30)
count.Size = UDim2.new(1, -24, 0, 18)
count.BackgroundTransparency = 1
count.TextXAlignment = Enum.TextXAlignment.Left
count.TextColor3 = Color3.fromRGB(200, 200, 210)
count.Font = Enum.Font.Gotham
count.TextSize = 14
count.Parent = panel
local barBack = Instance.new("Frame")
barBack.Position = UDim2.fromOffset(12, 54)
barBack.Size = UDim2.new(1, -24, 0, 8)
barBack.BackgroundColor3 = Color3.fromRGB(60, 60, 75)
barBack.Parent = panel
Instance.new("UICorner").Parent = barBack
local bar = Instance.new("Frame")
bar.Size = UDim2.fromScale(0, 1)
bar.BackgroundColor3 = Color3.fromRGB(90, 200, 120)
bar.Parent = barBack
Instance.new("UICorner").Parent = bar
gui.Parent = player:WaitForChild("PlayerGui")
local function refresh()
local index = player:GetAttribute("QuestIndex")
local progress = player:GetAttribute("QuestProgress")
if type(index) ~= "number" or type(progress) ~= "number" then
title.Text = "Loading quests..."
count.Text = ""
return
end
local quest = quests[index]
if not quest then
title.Text = "All quests done"
count.Text = "Nice work!"
bar.Size = UDim2.fromScale(1, 1)
return
end
title.Text = quest.title
count.Text = progress .. " / " .. quest.amount .. " Reward: " .. quest.reward .. " coins"
TweenService:Create(bar, TweenInfo.new(0.2), { Size = UDim2.fromScale(progress / quest.amount, 1) }):Play()
end
questCompleted.OnClientEvent:Connect(function(questTitle: string, reward: number)
title.Text = "Quest complete: " .. questTitle
count.Text = "+" .. reward .. " coins"
bar.Size = UDim2.fromScale(1, 1)
task.wait(2)
refresh()
end)
player:GetAttributeChangedSignal("QuestIndex"):Connect(refresh)
player:GetAttributeChangedSignal("QuestProgress"):Connect(refresh)
refresh()
Step 6: Test it
- Make sure you have a Coins value in leaderstats (the leaderboard guide makes one), or the rewards have nowhere to go.
- Press Play. The panel shows "Collect 5 Apples" and "0 / 5".
- Touch apples. Each one vanishes for 8 seconds and the count goes up. On the fifth, the panel says "Quest complete" and Coins goes up by 50.
- Defeat 3 Slimes with a weapon that adds the creator tag. If kills do not count, check the Humanoid for a
creatorObjectValue while you hit it (Explorer, during Play). - To test saving, publish, turn on Enable Studio Access to API Services in Experience Settings, Security, then stop and play again: you should be on the same quest.
Ideas to build on it
- Talk to an NPC to start: give each quest a starting NPC and only set QuestIndex when the player talks to it. The NPC dialogue guide has the talking part; make the "Accept" choice call a server function.
- Daily quests: pick three random quests per day and reset them with the date, the same way daily rewards check the day.
- XP rewards: add an
xpfield and fire the AwardXp event from the XP and level system when a quest completes. - New kinds: a "Reach" quest that counts touching a tagged zone part is one more
ifand one more call toaddProgress.
Common errors and fixes
Check the Output window first. Most quest problems are a name that does not match.
Touching an apple does nothing
Check the tag is exactly QuestItem and the ItemName attribute is a string that matches the quest's target, such as Apple. Also check CanTouch is ticked. Items only react when the player's current quest needs them.
Defeating enemies does not count
The enemy needs the QuestEnemy tag on the Model (not a part inside it), a Humanoid, and an EnemyName attribute. The weapon must add the creator tag before the killing hit (Step 4).
The panel says Loading quests... forever
The Quests script sets the attributes. Make sure it is a Script in ServerScriptService and has no red error, often a missing QuestConfig ModuleScript.
Requested module experienced an error while loading
There is a typo in QuestConfig, usually a missing comma between quests. See that error's page.
Build it with RoCode
If you would rather not wire it up by hand, RoCode can build it in the place you have open. RoCode is an independent AI agent for Roblox Studio, not made by Roblox: you describe the change in a web chat, and its Studio plugin creates the scripts and parts in your Explorer.
Add quests to my game: collect 5 apples around the map, then defeat 3 slimes, then 10 crystals, with coin rewards, a quest panel in the top left and progress that saves.
- Can read your place first to find your enemies, weapons and coins, then tags and wires them
- Writes the scripts with Create Script and is told to compile-check each one with Check Script
- Sets an undo point before and after each batch of changes, so Ctrl+Z steps back one batch at a time
Questions
How do I make a quest system in Roblox Studio?
Put the quests in a ModuleScript list, track each player's quest and progress in a server Script, count progress when the server sees the player do the task, and show it with a LocalScript. Steps 1 to 5 build each part.
How do I make a collect quest in Roblox?
Tag the items QuestItem, give them an ItemName attribute, and have a server script add progress when a player touches one. The Quests script in Step 2 does this.
How do I know who killed an NPC for a quest?
Have the weapon put an ObjectValue named creator with the attacking Player in the NPC's Humanoid, then read it when the Humanoid dies.
Should quest progress be on the client or the server?
The server. The client can show it, but if the client decides when a quest is done, exploiters finish every quest without playing.
How do I save quest progress?
Save the quest number and progress in a data store when the player leaves and when the server closes, as the Quests script does.
Sources and further reading
- Roblox Creator Docs: ModuleScript. sharing the quest list
- Roblox Creator Docs: CollectionService. tags on items and enemies
- Roblox Creator Docs: Attributes. ItemName, EnemyName and the progress values
- Roblox Creator Docs: Humanoid.Died. when an enemy is defeated
How the code was checked: every script on this page passes Luau's strict type checker against Roblox's API definitions (luau-lsp, 14 November 2026). A type check catches misspelt APIs and wrong types, not game logic, so playtest in Studio before you publish.