When tool is cloned, animations and functionality doesn't work no more

local prox = script.Parent
prox.ActionText = prox.Parent.Name

local model = script.Parent.Parent.Parent.Name

local tool = game.ReplicatedStorage["Food // Settings"].Tools:FindFirstChild(model)

prox.Triggered:Connect(function(player)
	local backpack = player.Backpack
	if player and player.Character and not backpack:FindFirstChild(tool.Name) then
		tool:Clone().Parent = backpack
	end
end)

script

local SETTINGS = require(game.ReplicatedStorage["Food // Settings"])

local values = {
	
	anim_speed = SETTINGS.Anim_speed;
	anim = SETTINGS.Animation;
	bool = false;
	bool_time = SETTINGS.booltime
}

local plr = game.Players.LocalPlayer; local char = plr.CharacterAdded:Wait() or plr.Character; local hum = char:WaitForChild("Humanoid"); local animationtrack = hum:LoadAnimation(values.anim); animationtrack:AdjustSpeed(values.anim_speed); local uis = game:GetService("UserInputService")

script.Parent.Equipped:Connect(function()
	uis.InputBegan:Connect(function(key, gp)
		if gp then return end if not char:FindFirstChild(script.Parent.Name) then animationtrack:Stop() return end
		
		if key.UserInputType == Enum.UserInputType.MouseButton1 and not values.bool then
			animationtrack:Play()
			values.bool = true
			wait(values.bool_time)
			animationtrack:Stop()
			values.bool = false
			
		end
	end)
end)

local script

Try creating a reference to the new tool that you cloned then parent it.

prox.Triggered:Connect(function(player)
	local backpack = player.Backpack
    local newFoodTool = nil

	if player and player.Character and not backpack:FindFirstChild(tool.Name) then
       if newFoodTool == nil then
           newFoodTool = tool:Clone()
           newFoodTool.Parent = backpack
       else
           print("You already have this tool!")
       end
	end
end)

Thanks for the code, but, it really didn’t help me on fixing the tool. In advance, thank you very for the script.

Chat Revival, just waiting for someone.