Tool not working after cloned

local player = game.Players.LocalPlayer
local price = script.Parent.Parent.Price
local plr = game.Workspace:FindFirstChild(tostring(game.Players.LocalPlayer.Name))

	if player.leaderstats.Coins.Value == price.Value or player.leaderstats.Coins.Value>price.Value then
		local leg = game.ReplicatedStorage.Gear:FindFirstChild(tostring(script.Parent.Parent.ItemName.Value)):Clone()
		leg.Parent = player.Backpack

The script works, but when it adds a tool to the player, for example, speed coil, it does not work or if it is pizza, the pizza will show up as well as the speed coil, but it will not work.

Please help

1 Like

I suggest disabling every script that is inside of those tools, and only enabling them after they have been cloned. Scripts can get errors if they start before they are in their preferred location, that’s why it’s good to only start them after they are cloned

not at all, but you are somewhat right, I realize that you are cloning the tool from the client you should clone it from the server so you should investigate before making a topic please read the rules.

If your script is a local script then this is the issue, you would want to use a server script to clone the tool to the player so the tool is functional, you can’t clone tools on the client and have them work