Okay, so I animated this weapon in Roblox Studio’s Animator. I created a Motor6D in the Rig’s Torso and set Part 1 to the weapon (as it’s a single part) and Part0 to the Torso.
However, in-game, the bar does not move.
I have some scripts which creates a Motor6D in the Player’s Torso when they join on the SERVER side. The other script connects it on the client for better visuals, however the weapon does not seem to be working.
In studio:
In game:
Scripts:
Server
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(character)
M6D = Instance.new("Motor6D", character.Torso) -- or the part that you have decieded
M6D.Name = "ToolGrip"
M6D.Part0 = character.Torso
character.ChildAdded:Connect(function(child)
if (child:IsA("Tool") and child:FindFirstChild("BodyAttach")) then
M6D.Part1 = child:FindFirstChild("BodyAttach")
end
end)
end)
end)
Client
local plr = game.Players.LocalPlayer
local character = plr.Character or plr.CharacterAdded:Wait()
local M6D = nil
character.ChildAdded:Connect(function(child)
M6D = character.Torso:WaitForChild("ToolGrip")
if (child:IsA("Tool") and child:FindFirstChild("BodyAttach")) then
M6D.Part1 = child:FindFirstChild("BodyAttach")
end
end)