Tool/Quest NPC System Paying (350 Robux)

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

In short toggle to the server mode then assign the player the tool and it should be working. The way you are giving the players the tool is the issue. i just tested it now and it is working

yeah its still not working for me i tried doing that.

Make sure that the object/tool name is “Engine” and is being hold by the player

yup thats the name, all the parts are named correctly and im holding them.