I am trying to script a tool. When I equip it, it should print out "tool was equipped", and when its activated it should print out "tool was activated". When I have the tool in the starter pack, it works absolutely fine, but when I clone it from the Replicated Storage into Player.Backpack, it doesn't work. I am cloning it through a local script in a shop GUI.
Tool Script:
tool = script.Parent handle = tool:WaitForChild("Handle")
tool.Equipped:Connect(function() print("the tool was equipped") end)
tool.Activated:Connect(function() print("the tool was activated") end)
LocalScript to clone it to Player.Backpack:
local apple = game.ReplicatedStorage:WaitForChild("Apple") local Player = game.Players.LocalPlayer local appleInInv = false
script.Parent.MouseButton1Click:Connect(function() if game.Players.LocalPlayer.leaderstats.Cash.Value >= 1000 and appleInInv == false then local CLONE = apple:Clone() CLONE.Parent = Player.Backpack game.Players.LocalPlayer.leaderstats.Cash.Value = game.Players.LocalPlayer.leaderstats.Cash.Value - 1000 appleInInv = true else if appleInInv == true then print("you already have this item!") else if game.Players.LocalPlayer.leaderstats.Cash.Value < 1000 then print("not enough money!") end end end end)

2 comments
Could I just write the tool script as a local script?
You could, but that still wouldn't make it to where the tool is cloned to your backpack.