Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to make animations i make (ex. walking, crouching, crawling) work?

OK, i know how to use the animator by getting the plugin, but i don't know how to make them work when, for example, i walk around my game. Any ideas?

2 comments

0

There is a wiki page that explains how to use animations, http://wiki.roblox.com/index.php?title=Animations

0

^^ that. Also use the default animation script as reference.

1 answer

You can modify the Character's Animate script by copying the Character's Animate Script and placing it in the StarterPlayer>StarterCharacterScripts Folder

From there you can plugin your own Walk Animation

Here's the Animate Script found in the Character by default.

function   waitForChild(parent, childName)
	local child = parent:findFirstChild(childName)
	if child then return child end
	while true do
		child = parent.ChildAdded:wait()
		if child.Name==childName then return child end
	end
end

local Figure = script.Parent
local Torso = waitForChild(Figure, "Torso")
local RightShoulder = waitForChild(Torso, "Right Shoulder")
local LeftShoulder = waitForChild(Torso, "Left Shoulder")
local RightHip = waitForChild(Torso, "Right Hip")
local LeftHip = waitForChild(Torso, "Left Hip")
local Neck = waitForChild(Torso, "Neck")
local Humanoid = waitForChild(Figure, "Humanoid")
local pose = "Standing"

local currentAnim = ""
local currentAnimInstance = nil
local currentAnimTrack = nil
local currentAnimKeyframeHandler = nil
local currentAnimSpeed = 1.0
local animTable = {}
local animNames = { 
	idle = 	{	
				{ id = "http://www.roblox.com/asset/?id=180435571", weight = 9 },
				{ id = "http://www.roblox.com/asset/?id=180435792", weight = 1 }
			},

------------------ Right here you Delete the Default Animation URL and Insert your Custom Walk Animation URL In Here
	walk = 	{ 	
				{ id = "http://www.roblox.com/asset/?id=180426354", weight = 10 } 
			}, 
	run = 	{
				{ id = "run.xml", weight = 10 } 
			}, 
	jump = 	{
				{ id = "http://www.roblox.com/asset/?id=125750702", weight = 10 } 
			}, 
	fall = 	{
				{ id = "http://www.roblox.com/asset/?id=180436148", weight = 10 } 
			}, 
	climb = {
				{ id = "http://www.roblox.com/asset/?id=180436334", weight = 10 } 
			}, 
	sit = 	{
				{ id = "http://www.roblox.com/asset/?id=178130996", weight = 10 } 
			},

Ta-Da! That's All. It's ready to work, just don't change the Animate Script's Name to anything else, keep it as it is.

This discussion is preserved as it was. New answers, comments, and votes are closed.