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

how do I make a animation go into a players humanoid when they join?

this is what I have but I'm not sure what to make the parent as to put it into there humanoid if they join

local function onPlayerAdded(player)
	local animation = Instance.new("Animation")
	animation.Parent = 
	animation.Name = "Animation"
	animation.AnimationId = "https://www.roblox.com/catalog/1222831397"
end


game.Players.PlayerAdded:connect(onPlayerAdded)

2 answers

You don't need a parent to play the animation ;)

You can parent it to the Player if you'd like..

But you do need to:

  • Use the LoadAnimation and AnimTrack:Play functions.

  • Make sure the AnimationID is valid and something the game creator owns.

  • Make sure the game has time to load the anim before trying to use the Play function

Try this script.But its only for walking and jumping so

This script must be put in StarterGui

wait(0.01)

local player = game.Players.LocalPlayer




local character = player.Character or player.CharacterAdded:wait() 

local animate = character.Animate 


-------EDIT ONLY THESE THINGS BELOW!!!!


animate.walk.WalkAnim.AnimationId = "rbxassetid://1221236212" -- Walking 
animate.jump.JumpAnim.AnimationId = "rbxassetid://1213202407" -- Jumping

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