Advertisement
OffAndSphere

Multi-hit killbrick code

Aug 26th, 2019
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. local PartsTouching = {}
  2.  
  3. script.Parent.Touched:Connect(function(hit)
  4. table.insert(PartsTouching, 1, hit)
  5. end)
  6.  
  7. script.Parent.TouchEnded:Connect(function(hit)
  8. table.remove(PartsTouching, 1)
  9. end)
  10.  
  11. while wait(1) do
  12. local player = game.Players:GetPlayerFromCharacter(print(PartsTouching))
  13.  
  14. player.Health = player.Health - 10
  15. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement