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

How do I give a tool an animation?

Asked by 7 years ago
Edited 7 years ago

so I've created this quick animation using a animation that animates the handle but I'm having difficulties exporting that into my tool example can yu halp :)

i tryed to give as much info as possibru

1 answer

Log in to vote
0
Answered by 7 years ago

Easy! All you have to do is link it and load it into the player! A simple script like this one,

local tool = script.Parent -- Variable to locate the tool
local player = game.Players.LocalPlayer
local character = player.Character

local AnimationAnim = Instance.new("Animation") -- Makes a new Animation instance
AnimationAnim.AnimationId = tool.Handle.YourAnimation.AnimationId -- locates the animation inside of the handle brick
local Animation = character.Humanoid:LoadAnimation(AnimationAnim) -- Puts it into your Humanoid so you can use it!

after you have that done all you need to do is

Animation:Play()

inside where ever you are trying to call the animation.

If you have any questions feel free to ask!

0
Thank you for your help but I tried doing this but it wouldn't work maybe I wasn't describing it very good. I was saying I made an animation that use Motor6D to animate the handle okay imma explain it lets say I have a gun I want to like animate some part of the gun to just move around and stuff overall thank you for the help <3 rareheaddress 74 — 7y
0
Oh! Then what you would have to do is you would have to CFrame the arms I think. I don't have much experience with CFraming and I know it could be a pain. I also don't have much experience with Moter6D. But I do know if it's done right it could look awesome. Sorry! CommanderSkywalkerTR 5 — 7y
Ad

Answer this question