Advertisement
beb876730

?

Aug 7th, 2024
10
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. local animation
  2.  
  3. script.Parent.Equipped:Connect(function()
  4. local humanoid = script.Parent.Parent:WaitForChild("Humanoid")
  5. local animator = humanoid:WaitForChild("Animator")
  6. local Torso = script.Parent.Parent:FindFirstChild("UpperTorso")
  7. or script.Parent.Parent:FindFirstChild("Torso")
  8. if Torso then
  9. if Torso.Name == "Torso" then
  10. local R6 = script.R6
  11. if not R6.AnimationId then
  12. error("R6 애니메이션 설정 안됨")
  13. end
  14. animation = animator:LoadAnimation(R6)
  15. else
  16. local R15 = script.R15
  17. if not R15.AnimationId then
  18. error("R15 애니메이션 설정 안됨")
  19. end
  20. animation = animator:LoadAnimation(R15)
  21. end
  22. else
  23. warn("플레이어 캐릭터 몸통 파트 탐색 실패")
  24. end
  25. end)
  26.  
  27. local cooldown = true
  28. script.Parent.Activated:Connect(function()
  29. if animation and cooldown then
  30. cooldown = false
  31. animation:Play()
  32. wait(2) -- 애니메이션 길이 넣기
  33. cooldown = true
  34. end
  35. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement