My problem is that everything works, except the animation simply won't play, the healing works, all of it. Besides playing the animation.
local ipService = game:GetService("UserInputService")
local plr
local char
local hum
local heal
game.Players.PlayerAdded:connect(function(p)
plr = p
p.CharacterAdded:wait()
char = p.Character
hum = char:WaitForChild("Humanoid")
local anim = Instance.new("Animation", char)
anim.Name = "Heal"
anim.AnimationId = "http://www.roblox.com/asset/?id=262886542"
heal = hum:LoadAnimation(char:WaitForChild("Heal"))
end)
ipService.InputBegan:connect(function(key,gameProcessedEvent)
if not gameProcessedEvent and key.KeyCode == Enum.KeyCode.H then
heal:Play()
if hum.Health <= 50 then
hum.Health = hum.Health + 50
elseif hum.Health > 50 then
hum.Health = hum.MaxHealth + hum.Health
end
end
end)
- Thanks for your help!

2 comments
Does your animation work in solo mode but not in normal play mode, by any chance? If it Works in solo mode, but not in normal mode, I may know the problem
It doesn't work in any