This is very weird, so I made a very simple animation:
robloxapp-20220415-1754189.wmv (271.0 KB)
robloxapp-20220415-1756387.wmv (919.4 KB)
The thing is, it only plays some parts (the arm). I also noticed that the animation does not play on repeat on the server and this got me very confused. It only plays once, and it doesn’t loop like in the client.
I think that the reason it doesn’t loop in the server is that I am setting a property of the animation in the client, therefore it doesn’t load for the server:
I also don’t believe I did anything wrong, if I am incorrect, then please tell me (code of the client below):
local humanoid = character:WaitForChild("Humanoid");
local animator = humanoid:WaitForChild("Animator");
local shoulderArms = Instance.new("Animation");
shoulderArms.AnimationId = "rbxassetid://9378108770";
shoulderArms = animator:LoadAnimation(shoulderArms);
shoulderArms.Priority = Enum.AnimationPriority.Action;
shoulderArms:Play();
shoulderArms.Looped = true;
I followed a tutorial: How to animate Tool Parts (Guns, Knifes etc.)
And yes, I do have the tool set to not need a handle, and I did connect the parts with a weld since I don’t need any of the others to be animated. I do have a part called BodyAttach and none of the tool’s parts are anchored, there are no other welds except the ones for the BodyAttach
Here is the server code:
client.CharacterAdded:Connect(function(character)
local M6D = Instance.new("Motor6D", character.Torso);
M6D.Name = "BodyAttach";
M6D.MaxVelocity = 1;
M6D.Part0 = character.Torso;
end);
Here is the tool code (server):
local character;
flag.Equipped:Connect(function()
character = flag.Parent;
flag.Parent:WaitForChild("Torso"):WaitForChild("BodyAttach").Part1 = flag.BodyAttach;
end);
flag.Unequipped:Connect(function()
character:WaitForChild("Torso"):WaitForChild("BodyAttach").Part1 = nil;
end);