Problem with tool holding animation

Hii! So basically what I want to do is that once my tool handle is transparent the regular holding animation will go away but once i make the tool visible the regular holding animation comes back. So I want to make my arm down in the picture. How would I do this without applying a custom animation? I’ve tried it out with RequiresHandle but once I rename the Handle back to “Handle” it wont attach to my hand.

Picture:

Thank’s for every help! :slight_smile:

8 Likes

I remember I did something with animations exactly like this.

I 100% remember what I did for ONE of the ways, not so much the other, but essentially what you are going to want to do is overlap the animation with your own, but make sure it’s animation priority is set to “Action”. you’ll want to make it play upon equipping the tool, so If I’m correct you can say something like:

local Tool = script.Parent
local Animation = Tool.Animation
local LoadAnim = Tool:LoadAnimation(Animation)

Tool.Equipped:Connect(function()
	Animation:Play()
    --Whatever extra code you want to add
end)

This should work, make sure you use a LocalScript.

Remember, any animation that has anything that effects the player’s arm that roblox uses to hold tools, it will give you problems as basically its two animations that are trying to compete to finish, specifically (from what I remember) any animations that have their priority listed higher than Action, example: Core, Idle, and Movement.

4 Likes

Hii! I want that it display’s on the server for everyone and in addition to that: What Animation should I use? :sob: Thank you still for your response!

4 Likes

Animations run on LocalScripts mainly, it will still show up for everybody, the reason it sounds confusing for it being on a LocalScript is because player animations are localized to your own player, so tools for example will play the same effect.

You would not want everyone in the server to play the same animation simultaneously because one guy equipped a tool lol.

I also would like to reword my last message, you might run into the problem of the default animation still playing despite you changing it.

The other way that I just happened to remember is that you can always just disable the tool animations by taking the Animate script from a Dummy Rig you can insert via the Rig inserters from Moon Animator, Rig Builder that is located under the “Avatar” tab in studio, AlreadyPro’s character inserter, or just a random dummy from toolbox that doesn’t have an already tampered animate script.

When you have this animate script, I suggest first go into the script and delete these lines:

unless you specifically have extra animations you wanna add for these, go ahead and add them, toolslash is for when the player clicks with a tool equipped, toolnone is for when a tool is just equipped and nothing else is happening with the tool, and I sadly forget what lunge does.

This should disable it, could be wrong.

Specific animations I’m not really sure of what you can do, can’t recommend anything other than try making some on your own.

4 Likes

To this: I don’t know if we are misunderstanding each other but at all I am playing animation on server side by simply loading the animation on the Humanoid of a character. This is how it works for me.

Apologies for this one either. xD
I am simply using: Tool Triggered → Play animations and overall I just want to remove the holding animation from a tool when my my Handle is transparent and when its not transparent it should have the holding animation. And overall I don’t get your solution, apologies. I am not really experienced when it comes to animations and rigs and moon animator and stuff. Sooo, is there maybe any other way than adding a new Animating script?

3 Likes

Also I am trying to do this without any additional animations. ^

3 Likes

So, you’re wanting the tool animation to NOT play when equipped, but when it’s not equipped, it plays it?

I’m sorry, that’s what I’m getting out of it if it’s not true.

3 Likes

Nonono. Look, when the tool is equipped the tool is itself invisible. So like the handle is invisible. When I press T the handle becomes visible. During the time when the handle itself is invisible I want that the holding animation isn’t played but when the tool is visible I want that the holding animaiton get’s played!

2 Likes

OHH, then, basically you want it to act like you’re unequipping it, but not actually unequipping it?

1 Like
script.Parent.Handle:GetPropertyChangedSignal("Transparency"):Connect(function()
local old = character:WaitForChild("Animate").toolnone.ToolNoneAnim.AnimationId
   if script.Parent.Handle.Transparency == 1 then
   local character = game.Players.LocalPlayer.Character
character:WaitForChild("Animate").toolnone.ToolNoneAnim.AnimationId = ""
	
   else
   
         character:WaitForChild("Animate").toolnone.ToolNoneAnim.AnimationId = old
	
  end
end)

sryy but im on mobile so this is a bit chunky, put it in the tool as a local script

2 Likes

see that’s what I originally was going to say, but I wanted more clarification.

2 Likes

Yep, basically. I have an accessory on my back which gets visible when I equip the tool and the Handle is not visible. When I press T the accessory on my back gets invisible and my handle gets visible. Do you know how I can do this?

1 Like

I know a way, just give me one second!

1 Like

Thank you! I will have a look into it!

1 Like

To stop it from playing the animation, you can try this

local UserInputService = game:GetService("UserInputService") -- InputService.
local Player = game.Players.LocalPlayer -- User's Character.
local Character = Player.Character -- Player's Character.
local AnimateScript = Character:WaitForChild("Animate") -- Character's Animate script.

local Handle = script.Parent.Handle -- Change depending on where "Handle" is located.

UserInputService.InputBegan:Connect(function(key) -- Fires function if key is being pressed.
	
	if key.KeyCode == Enum.KeyCode.T then -- We specify what key is being pressed, if it is T then we can add our needed function.
		
		AnimateScript.toolnone.ToolNoneAnim:Stop() -- Stops animation that plays when you equip the tool.
		-- Add whatever other code you may have
		
	end
	
end)

UserInputService.InputEnded:Connect(function(key) -- Fires function if key is no longer being pressed.
	
	if key.KeyCode == Enum.KeyCode.T then
		
		AnimateScript.toolnone.ToolNoneAnim:Play() 
		-- Add whatever other code you may have
		
	end
	
end)
1 Like

Something is a bit weird. When I equip the tool and press T to equip and do the stuff this happens:

https://gyazo.com/910bfbe741ce9c85c9ae9a9f96493163

When I unequip the tool so like move it into the Backpack and then equip it again this happens:

https://gyazo.com/20b20cc41dc138be1792cf5fc045a60c

1 Like

Heyy! I am unable to stop the ToolNoneAnim as it’s the animation itself and not the animation track. :confused: You can have a look at

and maybe we can get this fixed or you just tell me if I can get somehow the animation track. xD

1 Like

I just realised that the one with the gyazo’s can’t wirj in a way I guess bcs we are changing the id. The new Id first takes place when I re-equip the tool ig :confused:

1 Like

I’ve simple made it now so that once I equip the tool itself the animation id stuff gets set to 0 and when I un-equip the tool itself it will get setted back to normal. So like I have overall no tool holding animation. Thank you for your code response! And @k_illedd, thank you for your time either! C:

2 Likes

No problem, sorry I wasn’t super quick to assist you and help you get it done quickly, but I’m glad I was able to help you aim in the right direction!

2 Likes