Tool works for me, but not for others

It works as intended for me, but when tested by other players it errors, idk why

The tool setup is this:
imagen

And there are scripts being a server and local, local:

local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()

local tool = script.Parent

local idle = char:WaitForChild("Humanoid"):WaitForChild("Animator"):LoadAnimation(script.Parent:WaitForChild("Idle"))
local sweep = char:WaitForChild("Humanoid"):WaitForChild("Animator"):LoadAnimation(script.Parent:WaitForChild("Sweep"))

tool.Equipped:Connect(function()
	
	game.ReplicatedStorage:WaitForChild("ToolEquip1"):FireServer(tool.MopModel.BodyAttach)
	
	char.UpperTorso.ToolGrip.Part0 = char.UpperTorso
	char.UpperTorso.ToolGrip.Part1 = tool.MopModel.BodyAttach
	
	idle:Play()
	
end)

tool.Unequipped:Connect(function()
	
	game.ReplicatedStorage:WaitForChild("ToolUnequip1"):FireServer()
	
	idle:Stop()
	
end)

tool.Activated:Connect(function()
	
	sweep:Play()
	
end)

The server:

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(char)
		
		local motor6d = Instance.new("Motor6D")
		motor6d.Parent = char:WaitForChild("UpperTorso")
		motor6d.Name = "ToolGrip"
		
	end)
end)

game.ReplicatedStorage:WaitForChild("ToolEquip1").OnServerEvent:Connect(function(player, location)
	
	local char = player.Character or player.CharacterAdded:Wait()
	char.UpperTorso.ToolGrip.Part0 = char.UpperTorso
	char.UpperTorso.ToolGrip.Part1 = location
	
end)

game.ReplicatedStorage:WaitForChild("ToolUnequip1").OnServerEvent:Connect(function(player)
	
	local char = player.Character or player.CharacterAdded:Wait()
	char.UpperTorso.ToolGrip.Part1 = nil
	
end)

Any ideas?

2 Likes

What’s the error it gives for other players?

2 Likes

Ok let me seeThis text will be blurred

2 Likes

This is one of the errors
imagen

1 Like

Still awaiting help
pepe-hmm

1 Like

Is the errors comes from the server script or the local script? I’m kinda confused about your problems ngl

1 Like

Try using :WaitForChild() when getting the BodyAttach, also check if the names are equal.

1 Like