I have a problem with this tool that use bodyattach

I tried to make it work with Lightsaber but it show two error that said ToolGrip is not a valid member of MeshPart “Workspace.DeathLilian.UpperTorso” - Client - LightsaberClient:15 and ToolGrip is not a valid member of MeshPart “Workspace.DeathLilian.UpperTorso” - Server - LightsaberServer:13
This is from output

  16:08:30.051  ToolGrip is not a valid member of MeshPart "Workspace.DeathLilian.UpperTorso"  -  Client - LightsaberClient:15
  16:08:30.052  Stack Begin  -  Studio
  16:08:30.052  Script 'Players.DeathLilian.Backpack.Test.LightsaberClient', Line 15  -  Studio - LightsaberClient:15
  16:08:30.052  Stack End  -  Studio
  16:08:30.099  ToolGrip is not a valid member of MeshPart "Workspace.DeathLilian.UpperTorso"  -  Server - LightsaberServer:13

Here a gif of what wrong with it

Is there any way to fix it?
Also I was follow the video on Youtube is this: How to ANIMATE TOOLS | HowToRoblox - YouTube

Look at the error. ToolGrip is not in the MeshPart when you are looking for it.

The maybe they should use WaitForChild()?
Check to see if you misspelt the name anywhere or Check if the ToolGrip is even in the MeshPart.

1 Like

Do you need to look at scripts to see what wrong with it?

Something’s preventing the server from creating the Motor6D, probably. If you look at the server code, can you ensure that the remotes were fired correctly?

1 Like

here a server script that inside ScriptServerService

	plr.CharacterAdded:Connect(function(char)
				
		local M6D = Instance.new("Motor6D")
		M6D.Name = "ToolGrip"
		M6D.Parent = char.UpperTorso
    end)
end)

game.ReplicatedStorage.ConnectM6D.OnServerEvent:Connect(function(plr, location)

      local char = plr.Character
      char.UpperTorso.ToolGrip.Part0 = char.UpperTorso
      char.UpperTorso.ToolGrip.Part1 = location
end)

game.ReplicatedStorage.DisconnectM6D.OnServerEvent:Connect(function(plr)
	
    plr.Character.UpperTorso.ToolGrip.Part1 = nil
end) 

Tool script

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

local tool = script.Parent


local idleAnim = char:WaitForChild("Humanoid"):LoadAnimation(script.FloatingAnim)
local shootAnim = char:WaitForChild("Humanoid"):LoadAnimation(script.ShootAnim)


tool.Equipped:Connect(function()

	game.ReplicatedStorage.ConnectM6D:FireServer(tool.BodyAttach)

	char.UpperTorso.ToolGrip.Part0 = char.UpperTorso
	char.UpperTorso.ToolGrip.Part1 = tool.BodyAttach


	idleAnim:Play()
end)

tool.Unequipped:Connect(function()

	game.ReplicatedStorage.DisconnectM6D:FireServer()

	idleAnim:Stop()
end)



tool.Activated:Connect(function()

	shootAnim:Play()
end)

And yes it fired correctly…

1 Like

Something tells me that CharacterAdded event on server wasn’t fired. Try resetting your character once and try the tool again. If it doesn’t work again, it’s something else.

It not worked after I reset my character…