Advertisement
ClockworkHorror

Brick follow 2

Jun 30th, 2015
302
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local Player = game.Players:FindFirstChild('ClockworkHorror')
  2. local Char = Player.Character
  3. local Torso = Char:FindFirstChild('Torso')
  4.  
  5. function trail(obj)
  6. local lastPos = obj.CFrame.p
  7. coroutine.wrap(function()
  8. while obj ~= nil do
  9. game:service'RunService'.Stepped:wait()
  10. local objC = obj:Clone()
  11. objC.Locked = true
  12. objC.FormFactor = 'Custom'
  13. objC.Parent = obj.Parent
  14. objC.Anchored = true
  15. local distance = (lastPos- obj.CFrame.p).magnitude
  16. objC.Size = Vector3.new(0.8,0.8,distance)
  17. objC.CFrame = CFrame.new(lastPos,obj.Position)*CFrame.new(0,0,-distance/2)
  18. coroutine.wrap(function()
  19. for i = 0,1,.1 do
  20. wait(.1)
  21. objC.Transparency = i
  22. end
  23. objC:Destroy()
  24. end)()
  25. lastPos = obj.CFrame.p
  26. end
  27. end)()
  28. end
  29. part = Instance.new("Part", workspace)
  30. local m = Instance.new('SpecialMesh', part)
  31. m.MeshType = 'FileMesh'
  32. m.MeshId = "http://www.roblox.com/Asset/?id=9756362"
  33. Instance.new('ParticleEmitter', workspace.Part)
  34. Instance.new('PointLight', part)
  35. part.FormFactor = Enum.FormFactor.Custom
  36. part.Size = Vector3.new(2,2,2)
  37. part.Anchored = true
  38. part.Locked = true
  39. part.CanCollide = false
  40. trail(part)
  41. part.BrickColor = BrickColor.new('1003') --Really black
  42. part.TopSurface,part.BottomSurface=0,0
  43. local point
  44.  
  45. local loop = coroutine.create(function()
  46. while true do
  47. for i=1,360,8 do -- i=1,360,0
  48. if Player.Character and not point then
  49. point = Player.Character:FindFirstChild("Torso")
  50. end
  51. if point.Parent.Name == Player.Character.Name then
  52. point = Player.Character:FindFirstChild("Torso")
  53. end
  54. if part then
  55. --Full_Loop = math.rad(i)
  56. part.CFrame = CFrame.new(point.CFrame.p)*CFrame.fromEulerAnglesXYZ(0.3,math.rad(i),0.5) * CFrame.new(2,0,-8) --CFrame.new(0,0,-4.75)
  57. end
  58. wait()
  59. end
  60. end
  61. end)
  62. coroutine.resume(loop)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement