hello once again i am asking for help. i am trying to get a custom animation to run when the player clicks a part so far i have not been able to get anything to work. could someone help me?
Looks like you forgot the other "
at the end of the AnimationId property string. Also, I would use the built-in property, "Character", which is automatically in the player.
1 | workspace.Hello.ClickDetector.MouseClick:Connect( function (player) |
2 | local animation = Instance.new( "Animation" ) |
3 | animation.AnimationId = “rbxassetid:// 04916278158 " |
4 |
5 | local loadedAnimation = player.Character.Humanoid:LoadAnimation(animation) |
6 | loadedAnimation:Play() |
7 | end ) |