Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local animation
- script.Parent.Equipped:Connect(function()
- local humanoid = script.Parent.Parent:WaitForChild("Humanoid")
- local animator = humanoid:WaitForChild("Animator")
- local Torso = script.Parent.Parent:FindFirstChild("UpperTorso")
- or script.Parent.Parent:FindFirstChild("Torso")
- if Torso then
- if Torso.Name == "Torso" then
- local R6 = script.R6
- if not R6.AnimationId then
- error("R6 애니메이션 설정 안됨")
- end
- animation = animator:LoadAnimation(R6)
- else
- local R15 = script.R15
- if not R15.AnimationId then
- error("R15 애니메이션 설정 안됨")
- end
- animation = animator:LoadAnimation(R15)
- end
- else
- warn("플레이어 캐릭터 몸통 파트 탐색 실패")
- end
- end)
- local cooldown = true
- script.Parent.Activated:Connect(function()
- if animation and cooldown then
- cooldown = false
- animation:Play()
- wait(2) -- 애니메이션 길이 넣기
- cooldown = true
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement