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.
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