Very strange bug I'm having a hard time troubleshooting (Cloning issue?)

So I have these few combat scripts but I occasionally get problems when testing them. It is odd because I don’t get console errors and the bug doesn’t happen in studio, only when I get a friend to join the main game and actually kill each other. Resetting doesn’t cause the bug

local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:wait()
local tool = script.Parent
local PlayerInfo = character:FindFirstChild("PlayerInfo")
local WeaponScript

	 PlayerInfo = character:FindFirstChild("PlayerInfo")
	PlayerInfo.Weapon.Value = true
	PlayerInfo.Weapon:FindFirstChildOfClass("ObjectValue").Name = tool.Name
	--if tool.Parent == character and character:FindFirstChild("Package") == nil and character.Humanoid.Health > 0 then
	WeaponScript = game.ReplicatedStorage["Package"]:Clone()
	WeaponScript.Parent = character

In this script, it works perfectly as it should the first time you are in the game. If you reset your character and respawn it still works fine. If I test it in studio with 2 clients and they kill each other, it still works fine. I get a friend in the actual game, we kill each other, and it bugs out the script. There are no console errors given (so I used the prints to debug). I have come to the conclusion that ONLY SOMETIMES when a friend kills you IN GAME there is a chance for the script to end in between prints 4 and 4.5.

I kept trying ways to fix this but without a console error I’m having trouble. I don’t think it is cloning the package correctly (even though the package and character are seemingly defined correctly).

Anyone see anything wrong with this? I’ll send the script that is in the package as well just in case that may be causing problems:

local Tool = script.Parent.Parent:FindFirstChildOfClass("Tool")

local Player = game.Players.LocalPlayer
local Character = Player.Character
local PlayerInfo = Character:FindFirstChild("PlayerInfo")
local PlayerCFrame = Character.HumanoidRootPart.CFrame
local AttackRemote = game.ReplicatedStorage.Remotes.AttackEvent
local VFXRemote = game.ReplicatedStorage.Remotes.VFXRemote
local ActionServerRemote = game.ReplicatedStorage.Remotes.ActionServerRemote
local UIS = game:GetService("UserInputService")
local Animator = Character:FindFirstChild("Humanoid").Animator

local WeaponName = "ISOH"

UIS.InputBegan:Connect(function(input, gpe)
		if input.UserInputType == Enum.UserInputType.MouseButton1 then
			if gpe then return end
		if PlayerInfo.Weapon:FindFirstChildOfClass("ObjectValue").Name == WeaponName then
		local data = {
			["Tool"] = Tool,
			["Weapon"] = WeaponName,
			["Character"] = Character,
			["Action"] = "M1"

Any help would be GREATLY appreciated. I’ve been trying to fix this for hours now and I’m so lost.

Bumping this because I desperately need help here

Again, still have gotten no help with this and am very lost