Weird tool behavior

  1. What do you want to achieve? Keep it simple and clear!
    solve or prevent this Odd behavior from occurring.
  2. What is the issue? Include screenshots / videos if possible!
    This issue occurs when the second player equips the tool 2 video povs: https://gyazo.com/cb35a567198348539363de9c6175f5c8
    https://gyazo.com/739113ef9de80b14a9334471ce7dec0a
    script:
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")

local Tool = script.Parent

local remote = game.ReplicatedStorage.GlobalCombatRemote
local raycastRemote = script.Parent.KatanaServer.raycastEvent

local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local rightArm = character:FindFirstChild("Right Arm")

local Combo = 0

local DMG = 5
local extraDMG = 2
local gWait = 0.3 -- General wait
local fWait = 2.5 -- Final wait

local KatanaTrail = Tool.Katana_Model.Trail

local KatanaAnimations = game.ReplicatedStorage.KatanaAnimations
local AttackAttribute = humanoid:FindFirstChild("Attacking")
local EquippedAttribute = humanoid:FindFirstChild("Equipped")
local StunnedAttribute = humanoid:FindFirstChild("Stunned")
	
local KatanaSequnce = {
	KatanaAnimations.K1,
	KatanaAnimations.K2,
	KatanaAnimations.K3,
	KatanaAnimations.K4,
	KatanaAnimations.K5
}




local function comboCheck()
	if Combo == 0 or Combo > #KatanaSequnce then
		return
	end
	
	local animation = KatanaSequnce[Combo]

	if not animation then
		warn("Invalid animation for Combo: " .. Combo)
		return
	end

	local KatanaTrack = humanoid:LoadAnimation(animation)


	if not KatanaTrack then
		warn("Failed to load animation for Combo: " .. Combo)
		return
	end

	AttackAttribute.Value = true
	KatanaTrack:Play()
	raycastRemote:FireServer(KatanaTrack.Length) -- Cast Hitbox
	KatanaTrail.Enabled = true

	wait(KatanaTrack.Length)

	AttackAttribute.Value = false
	KatanaTrail.Enabled = false

	if Combo == #KatanaSequnce then
		wait(fWait)
		Combo = 0
	end
end



	
Tool.Activated:Connect(function()
	if AttackAttribute.Value == false and Tool.Enabled == true and EquippedAttribute.Value == true and StunnedAttribute.Value == false then
		Combo += 1;
		
		comboCheck()
		
		print(KatanaSequnce[Combo], "Sequence")
		
	end
	
	
end)

Tool.Equipped:Connect(function()
	character.Animate.Enabled = false
	Tool.KatanaAnimate.Enabled = true
	EquippedAttribute.Value = true
	remote:FireServer()
	

end)

Tool.Unequipped:Connect(function()
	EquippedAttribute.Value = false
	character.Animate.Enabled = true
	Tool.KatanaAnimate.Enabled = false
	local motor6dDestroy = rightArm:GetDescendants()
	for _, obj in ipairs(motor6dDestroy) do
		if obj:IsA("Instance") then
			obj:Destroy()
		end
	end
end)
  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?.
    I’ve tried looking but no results replicated my issue not sure what’s causing this. This issue also persisted in a complete new baseplate

this happends when a tool that is already inside a player is shared with another player, causing it to do this behavior.

Glad its not only me perhaps its a engine bug?

What I meant to say is that, you are somehow sharing a tool with 2 players, each player should have their own tool, on the other side, are you using motor6d in the tool?

Yes i set it so the BodyAttach Part will be animated utilizing motor6d

are making sure that bodyattach is attaching to the tool’s owner character?

Ah so currently the bodyAttach part Parent is set to the Tool should i be setting it to the individuals character?

this will help you