Like I want to know if its possible to make a tool animate using animation editor. I was thinking of making a basketball dribble using animations but im not sure how exactly. Iv looked into animations itself and I tried to make one myself but it came out wrong. I know I need to make a motor6d to attach the basketball to a block rig and made animations like you would usually do. But when I exported it out and added it to the tool, when the player touched the tool instead of dribbling like it should have, it dribbled sideways looking really wierd. I just want to know how you would create a basketball dribbling through animations.
How would you animate a tool?
1 answer
You can animate a tool.
You will need:
Some Scripting knowledge
A tool you would like to animate
To start off:
You need to take all of the baseparts (interact-able objects, e,g part, wedge, sphere, not scripts, values ect) in a model. One of the parts need to be called "FakeHandle" , this will be where you hold it. If you already have a part called Handle rename it to FakeHandle. Copy the fakehandle into workspace, as it is needed later.
Select the primary part of the model as FakeHandle.
Now you need an Animation Controller, unfortunately you cannot insert it right into the model straight away so you have to create it via script.
Insert a normal script into workspace.
put this script inside it:
local a = Instance.new("AnimationController")
a.Parent = game.Workspace
Play the game, open workspace and copy the animation controller.
Stop playing the game.
Delete the script.
Paste the Animation Controller into the model.
Call it AC.
Then use the custom character creator plugin to make the rig (tool).
CUSTOM CHARACTER CREATOR.
If you don't know how to make a rig, I recommend you watch this video, Please keep in mind YOU DO NOT NEED A HUMANOID ROOT PART. Its not using a humanoid.
video
Then download the animation plugin.
here...
make some animations.... lol
Then the scripting...
Create a tool and put the model you made earlier in the tool. Call the model "MovingParts".
Insert a part into the tool called"Handle", DO NOT insert it into the model. The handle needs to be in the same position as the "Fake Handle"., it doesn't have to be perfect, though.
Insert a Local Script into the tool.
use this script...:
--Gun is the part of the gun that contains: Handle, Values and Scripts
local Gun = script.Parent
--AnimGun is a model because its a Rig, So it can be animated
local AnimGun = Gun:WaitForChild("MovingParts")
--Fake Handle (used in animation)
local FHandle = AnimGun:WaitForChild("FakeHandle")
--Real Handle (Used to hold tool)
local RHandle = Gun:WaitForChild("Handle")
--Make a table of the elements in MovingParts
local guntable = AnimGun:GetChildren()
--Make a weld from Real to Fake handle, parent weld to Real Handle
local HandleWeld = Instance.new("Weld",RHandle)
HandleWeld.Part0 = RHandle
HandleWeld.C0 = RHandle.CFrame:inverse()
HandleWeld.Part1 = FHandle
HandleWeld.C1 = FHandle.CFrame:inverse()
--Animating Part
local AnimationController = AnimGun:WaitForChild("AC") --Equivilent to Humanoid, instead used for animating NPCs
local Animation = Instance.new("Animation")
Animation.AnimationId = "https://www.roblox.com/Asset?ID=000000001" --Put the animation ID here
local LoadAnimation = AnimationController:LoadAnimation(Animation) --Loads the Animation
print("Loaded the Animation")
function onKeyPress(actionName, userInputState, inputObject) --Function for playing animations
if userInputState == Enum.UserInputState.Begin then
LoadAnimation:Play() --Plays the animation
print("Animation played")
end
end
game.ContextActionService:BindAction("keyPress", onKeyPress, false, Enum.KeyCode.R) --when r pressed does function
should work
7 comments
God I love you for this. Everything is so detailed. I really appreciate it. Ill try this out and see if it works.
Um i had a question. what if you wanted to animate the ball with the player itself
Like I get this is how to animate the tool specifically but how would you animate the tool with the player together. For example once a player gets the tool into his backpack it loads an animation. How would you make that animations using animation editor?
I'm not sure myself
please accept if I helped / it worked :D
Mb I forgot and thanks a lot
how would you rig the tool? you didnt say it clearly, if I wanted to rig a mag inside a gun what would have the Motor6D?
This discussion is preserved as it was. New answers, comments, and votes are closed.

6 comments
yes
Yeah, it very much is.
Can one of you tell me how exactly I can? Like if using motor6d to combine the tool with he player right when the player touches the ball is right. I spent a while but it keeps coming out wrong. Not sure what to do :/
alright I right up an answer but idk if it'll be exactly what you are looking for but it will help you
Honestly at this point any advice would help :/
accept my answer if it worked :D it took me a long time to write up