Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Hello How to make a when you equip a gun it plays animation ?

Asked by 5 years ago

can someone say me how to make it? in CFrame Like this

i know how to make the animations but i dont get it how to make the animation play when he equips the gun

EquipAnim = function(char, speed, objs)
            ts:Create(objs[1],TweenInfo.new(0.25),{C1 = CFrame.new(0.340285569, 0, -0.0787199363, 0.962304771, 0.271973342, 0, -0.261981696, 0.926952124, -0.268561482, -0.0730415657, 0.258437991, 0.963262498)}):Play()
            wait(0.1)
            ts:Create(objs[2],TweenInfo.new(0.25),{C1 = CFrame.new(0.67163527, -0.310947895, -1.34432662, 0.766044378, -2.80971371e-008, 0.642787576, -0.620885074, -0.258818865, 0.739942133, 0.166365519, -0.965925872, -0.198266774)}):Play()
            wait(0.25)
            objs[4]:WaitForChild("Click"):Play()        
        end;

1 answer

Log in to vote
1
Answered by
sydre 229 Moderation Voter
5 years ago

You can use the function Equipped to see when the tool is equipped. To learn how use Equipped, see the code below.

Tool(Replace "Tool" with the name of your tool).Equipped:Connect(function()

Put the code that will activate the animation here

end)

Ad

Answer this question