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

How to create a giver for an Animation Package?

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!

1 comment

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.

1 answer

✓ Accepted answer
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.

1 comment

0

Thank you so much!

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