I need help making npc that gives quest!

I need help making an NPC that gives quests when you click them but you would need to be level 15 <<< example: also if your not level 15 it says “get lost” or “come back when ur stronger”
Things Like that

Thank you.

Just create an NPC, with a proximity prompt or any event u want to trigger it, create a server sided stats/level table. Compare if the player has enough level and make the NPC to say things to player based on that.

1 Like

I dont know how to do the last thing like compare :confused:

What do you use to store the players level?

-- example

if player.Level.Value >= 15 then
  -- do stuff
end
1 Like

just like

if playerLever < 15 then
    questRejected()
end

Check some topics about what u wanna do:

https://education.roblox.com/en-us/resources/if-then-statements

1 Like

Thank everyone that helped me it worked

1 Like

I wanted to say the same thing!

Wat guys, its giving me an error
local remote = game:GetService(“ReplicatedStorage”):WaitForChild(“QuestRemote”)
local player = game.Players.LocalPlayer
local questInfoF = player:WaitForChild(“QuestInformation”)
local level = game.Players.LocalPlayer.leaderstats.Rank

if player.leaderstats.Rank.Value >= C- then <<<< there how can i fix it?
function cancelQuest()
script.Parent.Parent.Visible = false
remote:FireServer(“CancelQuest”)
remote.OnClientEvent:Connect(function(val, questInfo)
if val == “TransferQuest” then
for i, v in pairs (questInfoF:GetChildren())do
if v.Name == “QuestTitle” then
script.Parent.Parent.Title.Text = v.Value
elseif v.Name == “QuestTask” then
script.Parent.Task.Text = v.Value
elseif v.Name == “QuestObjective” then
script.Parent.Progress.Text = "0 / “…v.Value
elseif v.Name == “QuestReward” then
script.Parent.Reward.Text = “Reward: “…v.Value…” Beli”
end
end
script.Parent.Parent.Visible = true
questInfoF:WaitForChild(“QuestProgress”).Changed:Connect(function()
script.Parent.Progress.Text = questInfoF:WaitForChild(“QuestProgress”).Value…” / "…questInfoF:WaitForChild(“QuestObjective”).Value
end)
elseif val == “CancelQuest” then
cancelQuest()
end
end)

script.Parent.Parent:WaitForChild(“Close”).MouseButton1Click:Connect(function()
cancelQuest()
end)
end

end

If it’s a string value, you would do

if table.find({"C-"}, player.leaderstats.Rank.Value) then

-- you can add more ranks by doing something like this:
--{"C-", "A+", "B"} 

This is because it’s a string and the example I showed only works for numbers and integers