Tool/Quest NPC System Paying (350 Robux)

I need help working on a script where there is an npc who wants 3 items, right now a billboard in the npc says 0/3 and when you give the 3 tools to him it has to be in order from “Engine” “Battery” “Tire” and then he gives you a random tool. I am lost and dont know where to start. every tool you give him should make the billboard text go up +1/3 I will pay 350 robux to a user who can fix this, (no tax).

2 Likes

here is the testing server for the place if this helps
NpcQuestTesting.rbxl (120.8 KB)

2 Likes

i am going for a system like break in’s uncle pete quest.

1 Like

You should post this on the Talent Hub instead of here.

edit nvm again it isn’t a bug so I just brought the post back

1 Like

im not trying to hire anyone, i just want to pay someone who can help me fix the issue im having, the scripts are in the testing server i gave.

1 Like

Hello i have done the the script, do you still need it?

1 Like

yes i do are you able to send the test place over?

1 Like

Yes i can, here it is:
NpcQuestTestingDone.rbxl (121.7 KB)

1 Like

Sure! I can make something like this easily!

Do you want the quest thing clientsided or server-sided?
In break in, as long as I remember it is clientsided until someone completes the quest

1 Like

yeah that is exactly what im looking for it should be client side until the quest gets complete. this is the updated dev forum post with the main components to the script

1 Like

The code is already client-sided and you can fire an remote event when the task completes

1 Like

im not looking for it to be fully client sided and the one you made you need the 3 tools in your inventory and you have to click the npc. it should be you equip the tool and click the npc to give the npc one of the tools.

1 Like

im not looking for it to be fully client sided

Not sure what you mean but that script is client sided and after the player finishes the task you can fire a remote event to the server to do what you want

it should be you equip the tool and click the npc to give the npc one of the tools.

that can be easily done:

local function CheckItems()
	
	for i,v in ipairs(objstate) do
		--print("v = ", v)
		if v == false then
			--print("i = ", i) 	
			local Value = player.Character:FindFirstChild(Objects[i])
			if Value and i == #objstate then
				--Player collected all the items 
				objstate[i] = true
				billboard.TextLabel.Text = tostring(i).." / 3" 
				
			elseif Value then
				--Player collected an item but not all
				objstate[i] = true
				billboard.TextLabel.Text = tostring(i).." / 3"
				
			else
				--Player don't have the item	
			end
			
			return;
		end
	end
end
1 Like

Sooo, i have done it where is the payment?

1 Like

its not even done right, i dont want it coming from the client side.

1 Like

its not even done right, i dont want it coming from the client side.

doing that on the server is inefficent and harder you have to do it on the client. though if you want to tell the server that player X has done the task, you basically add a RemoteEvent in the ReplicatedStorage and then fire it.

1 Like

yeah but you are looking for payment but the way i want it is when the players join they can all help with the one quest which is server sided and the tool even should be client sided where it interacts with the model from the client side.

1 Like

If you want the serverside then create a script in the ServerScriptServer then add this:

--local player = game:GetService("Players").LocalPlayer --The Player
local billboard = workspace:WaitForChild("NPC"):WaitForChild("BIllboard"):FindFirstChild("BillboardGui") --The Billboard
local clickDetector = workspace:WaitForChild("NPC"):WaitForChild("ClickDetector") --The ClickDetector

local objstate = { -- The state of the object
	false,
	false,
	false,
}

local Objects = { -- The objects
	"Engine",
	"Battery",
	"Tire",
}

local function CheckItems(player :Player)
	
	for i,v in ipairs(objstate) do
		
		if v == false then
			--local Value = player.Backpack:FindFirstChild(Objects[i]) or player:FindFirstChild(Objects[i]) 	
			local Value = player.Character:FindFirstChild(Objects[i])
			
			if Value and i == #objstate then
				--Player collected all the items 
				objstate[i] = true
				billboard.TextLabel.Text = tostring(i).." / 3" 

			elseif Value then
				--Player collected an item but not all
				objstate[i] = true
				billboard.TextLabel.Text = tostring(i).." / 3"

			else
				--Player don't have the item	
			end

			return;
		end
	end
end

clickDetector.MouseClick:Connect(function (playerWhoClicked)
	CheckItems(playerWhoClicked)
end)

it didnt even work. go onto the test server and try it for urself.

i tried it before giving it you and it’s working the reason it isn’t working for you i believe that the player has the tool locally and that’s why i suggested using client-sided