So I want a animation to play when I equip the gun, To make it look like your taking the gun out of it's holster. I have an animation inside of the gun's Handle, And a Local script inside the handle too. And I have this:
local tool = script.Parent.Parent.Parent.M16A4 local anim1 = script.Parent.EquipAnimation tool.Equipped:Connect(function() anim1:Play() end)
VERY simple, And for some reason its not working??
Ok, you must not know much about animation or scripting cause this is very simple. Anyway when scripting a animation you always have to load it. Such as: In this script I'm assuming you already have the Player set as a variable
local anim1 = script.Parent.EquipAnimation local anim2 = Player.Character.Humanoid:LoadAnimation(anim1) anim2:Play()
This script is basically getting the animation. Once got it loaded it into your humanoid. Then Plays it. Now lets imply this into your script. And i will assuming you already have the correct variables.
local tool = script.Parent.Parent.Parent.M16A4 local anim1 = script.Parent.EquipAnimation tool.Equipped:Connect(function() local anim2 = Player.Character.Humanoid:LoadAnimation(anim1) anim2:Play() end)
If this helped you please give it a answeared thingy
Regards, Bl_ueHistory