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

Am I right about this? (Animation Handler)

Asked by 9 years ago

Alright, I'm using my own custom body for animation- don't I have to rename and add parts to the part of an Animation handler that has this in it for the animations to work?:

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")

Also, am I right that each local figure is a part, and in the "()" is (Part0, "Then Part1")?

1 answer

Log in to vote
1
Answered by
Soliate 80
9 years ago

No it's what ever is inside the brackets is the Child of your Object that the function is waiting for.

-- ObjectParent:WaitForChild(ChildOfTheParent)
local Figure        = script.Parent
local Torso         = Figure:waitForChild("Torso")
local RightShoulder = Torso:waitForChild("Right Shoulder")
local LeftShoulder  = Torso:waitForChild("Left Shoulder")
local RightHip      = Torso:waitForChild("Right Hip")
local LeftHip       = Torso:waitForChild("Left Hip")
local Neck          = Torso:waitForChild("Neck")
local Humanoid      = Figure:waitForChild("Humanoid")

If you would like for more help go to the ROBLOX Wiki

Ad

Answer this question