If I clone a tool into the player’s backpack nothing inside of it will run I don’t get any errors either, and everything works but not the tool. what happens

everything works but the localscript in the tool does not run.

givetoolevent.OnServerEvent:Connect(function(player, v)
	v:Clone().Parent = player.Backpack
end)

mouse.Button1Down:Connect(function()
if mouse.Target ~= nil and mouse.Target.Parent.Name == "Items" then
	local distance = (player.Character.HumanoidRootPart.Position - mouse.Target.Position).magnitude
	if distance <= 5 then
		for _,v in pairs(guns) do
			if v.Name == mouse.Target.Name then
				givetoolevent:FireServer(v)
			end
		end
	end
end
end)

2 comments

0

Is the local script in this?

0

the buttondown event is in the local script the onserverevent is in serverscript, if I put the gun into startergear and reset it works but not when putting it into backpack which is what i need.