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.
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.
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.
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?
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!
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
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?
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)
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
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: