Hi I have an animation and it works in Moon Animator but not in studio. The animation is under the game’s group and not me so it not that. It’s a swing animation and the walking animation works.
ID: rbxassetid://13618755360
Code:
for _,v in pairs(HumanoidParts) do
if v then
v.Touched:Connect(function(PlayersPart)
if DamageDebounce or Humanoid.Health <= 0 then return end
DamageDebounce = true
if PlayersPart.Parent:FindFirstChild("ThisIsAPlayer") or PlayersPart.Parent.Parent:FindFirstChild("ThisIsAPlayer") then
local PlayersHumanoid = PlayersPart.Parent:FindFirstChild("Humanoid") or PlayersPart.Parent.Parent:FindFirstChild("Humanoid")
if PlayersHumanoid then
Humanoid.Animator:LoadAnimation(Humanoid.Parent:FindFirstChild("Swing"))
PlayersHumanoid:TakeDamage(SCPStats.Damage)
CreateSound(v)
wait(SCPStats.DamageRate)
DamageDebounce = false
else
wait(SCPStats.DamageRate)
DamageDebounce = false
end
else
wait(SCPStats.DamageRate)
DamageDebounce = false
end
end)
end
end