I'm trying to clone a tool from ReplicatedStorage into a players backpack with a command
when I type the command in the script runs through but the receiving player doesn't get the tool.
Here is the script:
commands.give = function(sender, arguments) print("Give Classup command fired by "..sender.Name) local playerToGiveClassupTo = arguments[1] local toolToGiveToPlayer = arguments[2] if playerToGiveClassupTo then local plr = findPlayer(playerToGiveClassupTo) if plr then local backpack = plr:WaitForChild("Backpack") local cloneTool = game.ReplicatedStorage.classup:Clone() cloneTool = plr.Backpack print(playerToGiveClassupTo.." was given ".. toolToGiveToPlayer) end end end
there aren't any errors in the output but no tool is in my inventory.
the command is ":give (Player name) classup" and the tool "classup" is in ReplicatedStorage.
any solutions?
edit: also this is just a section of the script showing this command only. all my other command scripts work fine.
sorry for the inconvenience, I just solved it by adding a parent to the tool line.
here for anyone who had the same problem:
cloneTool.Parent = plr.Backpack