Tool not duplicating

Module script:

Player.GiveItemByServer = function(PLR, Item, Amount)
	local BackpackEvent = game.ReplicatedStorage.ToolsM.Backpack
	BackpackEvent:FireClient(game.Players.ZINTICK, Item, Amount)
	if PLR.Backpack:FindFirstChild(Item) == nil then
		print("ss") -- prints ss
		local c = game.ServerStorage.Usables:FindFirstChild(Item):Clone()
		c.Parent = PLR.Character
	end
	
end

server script

PlayerM.GiveItemByServer(game.Players:FindFirstChild("ZINTICK"), "Trowel", 5)

backpack:

empty


the tool duplicating in the back is only after calling the the module script function multiple times…

and printing the parent gives the wanted answer: the player aka my player “ZINTICK”

Can u provide the client script and also does it print ss

Yes it prints ss and there isn’t a client script relating to this situation exactly it just script (server) and module

Try this:

Player.GiveItemByServer = function(PLR, Item, Amount)
	local BackpackEvent = game.ReplicatedStorage.ToolsM.Backpack
	BackpackEvent:FireClient(game.Players.ZINTICK, Item, Amount)
	
	if PLR.Backpack:FindFirstChild(Item) or PLR.Character:FindFirstChild(Item) then return end
	
	game.ServerStorage.Usables:FindFirstChild(Item):Clone().Parent = PLR.Backpack
end

You need to give players tools through the backpack not their character

1 Like

I didnt copy ur script but the backpaack part helped a lot thanks!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.