Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local enemy = script.Parent.Humanoid
- local anim = script.Parent.Humanoid.AnimationDuck
- local load = script.Parent.Humanoid:LoadAnimation(anim)
- while wait() do
- for i,v in pairs(game.Players:getChildren()) do
- local character = game.Workspace:WaitForChild(v.Name)
- enemy:MoveTo(character.PrimaryPart.Position)
- load:Play()
- enemy.MoveToFinished:Wait(1)
- load:Stop()
- script.Parent.Head.Touched:Connect(function(hit)
- if hit.Parent.Name == character.Name then
- character.Humanoid.Health = character.Humanoid.Health -1
- end
- end)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement