How to make this gun go away after the unequip animation has finished?

How would I make this gun go away and sync with the animation? I’ve been thinking of cloning the gun again I thought that would be glitchy.
Heres a video:
https://gyazo.com/09e7de699f260eeeff0dcbc1bd8c1367

1 Like

From what I see on the video there is an animation for taking back the gun and it disappears right when it starts so, when that animation plays you can do: gun:Destroy(), make it invisible or put it in the inventory.

1 Like

That wasn’t what I was looking for, the equip animation is fine but the unequip one takes away the gun too fast. I want a soloution to make it stay until the animation has stopped.

Add Animation.Stopped:Wait() then hide the gun.

you’ll just have to add a wait before the destroy and time the wait so that its when the animation is done

No, the gun automatically goes away after unequipping. I’m not doing Destroy()

That’s how Roblox’s inventory system works, I don’t know if there is a work-around to that apart from making your own inventory. Hopefully you find a solution!

1 Like

I believe what you’re trying to do would require some custom logic implementation over Roblox’s default tool behavior.

You can try start off by welding the model of the gun to the character and playing the equip animation then hide the model when the animation is over and then call Humanoid:EquipTool(tool) without an animation. You may have to modify your existing animations to support this though. The same logic can be applied backwards except you’ll be using the Unequipped event from the tool to hide the gun.

Ah well, thanks for helping but I’d rather not go through all that. Instead I’ll probably set the animation speed faster to make it less noticeable.

just make the gun become invisible when the animation reach a marker.
you can add a marker into the animation that you can fire the script when the animation reach a frame with the marker.

AnimationTrack:GetMarkerReachedSignal (roblox.com)

2 Likes

Thanks but I already said to leave it and I’ll use other methods instead.

does the gun have a bone?

if yes you can store the gun somewhere.
if you untarget one of the bone c0 or c1 you can store the gun some where and call it when you want and the position of the gun will be perffect as longe you target back the c1 or c0 depending on wich one you removed the target.

I didn’t make the animations, my friend @lacccccccccc did. We are working on a project.