Upon the click of a GUI, my tool is cloned from replicated storage to the players backpack.

There is a local script in the GUI that fires the remote event for the Tool-Giver.

The code below is a script inside the workspace to give the player the tool.

The tool itself does appear in the players backpack but for some mysterious reason the handle and another part are missing.

storage = game:GetService("ReplicatedStorage")

local ToolGiverEvent = storage:WaitForChild("ToolGiverEvent")

--Guns, I've tried storing the guns in lighting and workspace.
guns = game.ReplicatedStorage.Guns


--the gun
M1 = guns.M1Garand


ToolGiverEvent.OnServerEvent:connect(function(player)
	
	local backpack = player.Backpack
	
	if player.Character ~= nil then
		
		--M1C is the guns clone
		local M1C = M1:Clone()
			
		M1C.Parent = backpack
		
	end
	
	
end)

Let me know if you need more information. Any help is appreciated! Thank you for reading!

3 comments

0

Provide the local script?

0

Try using MakeJoints() to keep tool together? so for example M1C:MakeJoints()

0

I tried MakeJoints it came with an error: makejoints not valid member of tool