Cloning tool from ReplicatedStorage breaks tool ingame, works in studio

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I’m cloning a tool from replicated storage using a server script and placing it in a player’s backpack.
  2. What is the issue? Include screenshots / videos if possible!
    The tool, when used in starterpack works just fine, for some reason when I clone it into the player’s backpack it no longer functions. There are no errors and no visible problems other than the tool’s lack of functionality. The tool only breaks ingame, it works perfectly fine in studio.
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    All the solutions I’ve found so far suggest shifting the script from a local script to a server script, however, I’ve been using a server script all along.
game:GetService("ReplicatedStorage").Punch:Clone().Parent = plr.Backpack

I don’t know.
Maybe search this IsStudio

1 Like

Are you able to send us code snippets of the parts you think are compromised, if you don’t know which then just use some print lines to see where the flow stops.

1 Like

Just use ServerStorage or Lighting. ReplicatedStorage breaks tool scripts

1 Like

I tried shifting it ServerStorage as well, it again, works in studio but not ingame.

1 Like

The script executes properly, I receive the tool in my backpack but using it doesnt run the animation nor does it execute the damage script

1 Like

I cannot help without any code snippets, it’s probably an issue with the script that doesn’t display any error.

1 Like
for i,v in pairs(alive)do
		local puncher = game:GetService("ServerStorage"):WaitForChild("Punch"):Clone()
		puncher.Parent = v.Backpack
end

This is the only pretty much afflicted script.

1 Like

Any ideas or insight into why this might be happening?

1 Like

Check if the tool really clone inside the player’s backpack or if its still available in ServerStorage (by checking on server).

1 Like

The tool is definitely there, it shows up but it’s unusable. It sticks out and the idle animation doesn’t play. Neither does the punching animation.

2 Likes

Maybe it’s the way roblox clients run local scripts, try making another localscript that loads within the player when he joins the game that will enable localscripts of any tool inserted into the backpack, and make it so the localscripts are disabled by default on server

1 Like