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

How to create a giver for an Animation Package?

Asked by 5 years ago

I've been searching for a script that'd give an animation pack, but no luck at all. What I'm essentially asking for help with is scripting an object to give an animation pack (such as Ninja Animation Package: https://www.roblox.com/catalog/658839027/Ninja-Animation-Package )

I've thankfully been able to find scripts that give you the package instantly when entering my game, but I simply want a player to get able to click on an object w/ a giver, and when clicking they will have equipped an animation package and walk around with said package - and when selecting another, it will replace the other animation package. Thanks to anybody who helps in any way!

0
You could script your own, however just using an animation handler would be much simpler, especially if it's not for a custom model. TiredMelon 405 — 5y

1 answer

Log in to vote
0
Answered by
vRizly 15
5 years ago
local cd = script.Parent.ClickDetector

cd.MouseClick:connect(function(plr)
    local hum = plr.Character:FindFirstChild("Humanoid")

    if hum then
        local anim = hum.Parent.Animate

        anim.run.RunAnim.AnimationId = "rbxassetid://656118852"
        anim.climb.ClimbAnim.AnimationId = "rbxassetid://656114359"
        anim.fall.FallAnim.AnimationId = "rbxassetid://656115606"
        anim.idle.Animation1.AnimationId = "rbxassetid://656117400"
        anim.idle.Animation2.AnimationId = "rbxassetid://656118341"
        anim.jump.JumpAnim.AnimationId = "rbxassetid://656117878"
        anim.swim.Swim.AnimationId = "rbxassetid://656119721"
        anim.swimidle.SwimIdle.AnimationId = "rbxassetid://656121397"
        anim.walk.WalkAnim.AnimationId = "rbxassetid://656121766"
    end
end)

Place the script inside a part and place a click detector inside the part.

0
Thank you so much! AngeIakos -2 — 5y
Ad

Answer this question