Animation will not play?
My problem is that everything works, except the animation simply won't play, the healing works, all of it. Besides playing the animation.
01 | local ipService = game:GetService( "UserInputService" ) |
08 | game.Players.PlayerAdded:connect( function (p) |
10 | p.CharacterAdded:wait() |
12 | hum = char:WaitForChild( "Humanoid" ) |
13 | local anim = Instance.new( "Animation" , char) |
17 | heal = hum:LoadAnimation(char:WaitForChild( "Heal" )) |
20 | ipService.InputBegan:connect( function (key,gameProcessedEvent) |
21 | if not gameProcessedEvent and key.KeyCode = = Enum.KeyCode.H then |
23 | if hum.Health < = 50 then |
24 | hum.Health = hum.Health + 50 |
25 | elseif hum.Health > 50 then |
26 | hum.Health = hum.MaxHealth + hum.Health |