I am making a game where a certain tool needed to be animated along with the player animation.
My solution to this is to disable the handle of the tool and just connect its primary part to the right hand of the character using motor6d, this allowed me to be able to also animate the tool movement.
The problem lies with the actual gameplay(Everything works fine in studio).
When the player equips the tool it doesn’t actually load the tool animation instead it just reset itself to its regular pose as it is, the character animation and everything else works except for the tool itself.
Here is a gif of it: https://gyazo.com/c630e21e29b6e4479b51ce90398ccbc2
Here is how it looks like when the tool is used(basically it creates a motor6d when it is equipped and connects the holder to the right hand of the character): https://gyazo.com/c1668f7cdb76944f8589200af60258ad
As shown here, I had to go really close to the character to actually fix the animation issue and load it properly, but if its reequipped and you’re far from the character, it does the same thing again and requires you to get close to it again to fix the animation.
I tried disabling the Enabled boolean property of the tool, manualactivation is false, and so is requirehandle property.
My main question is why this is happening and how do I stop this from happening.
Update: Heres my script for the tool.
--ServerScript that is used to create the motor6d when it is equipped
script.Parent.Equipped:Connect(function()
local motor = Instance.new("Motor6D", script.Parent.Holder)
motor.Part0 = script.Parent.Parent.RightHand
motor.Part1 = script.Parent.Holder
end)
script.Parent.Unequipped:Connect(function()
if script.Parent.Holder:FindFirstChildOfClass("Motor6D") then
script.Parent.Holder:FindFirstChildOfClass("Motor6D"):Destroy()
end
end)
--The Client script
script.Parent.Equipped:Connect(function()
if Player.Character.Humanoid.Health > 0 then
Equip = true
IdleShield:Play(.25)
end
end)
Motor6Ds for tools should be created on the server, so make sure you’re doing that. When animating a tool, I usually destroy the RightGrip weld, then create the motor6D. Keeping the handle is usually a good thing. If you don’t want the handle, make the tool itself (which has no actual parts in it) and a separate model with the tool’s parts to avoid ROBLOX’s default tool stuff interfering while also having the tool for the backpack system. This will require some scripting to get working but if you don’t want to use a handle it might be necessary.
Both the animation priority are all in action and also the motor6ds are created in server, it shouldn’t load the animation normally when the player gets close to it if the motor6d is not made on server. Thank you for the info though, I double checked them just now.
I don’t think so as everything works properly in my studio tests, the tool animation gets replicated properly If the player gets close enough to the character who’s tool is not replicating properly.
Studio has different methods of replicating than an actual game. I actually encountered an issue where Motor6Ds didnt function properly in-game but worked in studio but I solved it by making the Motor6D on the server. Like I said, you should try and use a handle in the tool and just destroy the RightGrip when it’s parented to the RightArm whenever the tool is equipped, then set the Motor6D.
I’m getting this exact same issue, it only works when i run into the other player or sometimes just works randomly. I’ve tried everything and still cant get it to work. Used to function flawlessly before a few days ago!
I have this exact same issue in all my games that rely on animation for the tools, and it happened after the latest update. I’m pretty sure this is the issue for both you and me, and hopefully Roblox will revert back soon. I can’t imagine anything else considering one of my affected games, I have no touched for months.
Agree, since he discussed about how the joint search stops at first model descendant, while my motor6d in my tool is pretty much 3rd model descendant so if it stops at first then that means it did not register the joint of my tool which is located at 3rd descendant.
Idk when did the latest happen but I remember having this issue for like couple days now.
Idk if your animations have already been fixed, but I’ve checked mine and it is still happening for me.
EDIT:
The revert has already been released as said by the staff but it still happens. 2nd thing is that I’ve researched more into the dev forum and found similar issues that happened at the start of April,
These guys have figured some ways to fix it and some of them worked for me but there is an issue that it still happens sometimes, either way I hope this will help you guys figure out a way to fix these while we wait for roblox to fix them.