Advertisement
ClockworkHorror

Brick Folow

Jun 28th, 2015
149
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. local part = Instance.new('Part', workspace)
  30. Instance.new('Fire', workspace.Part)
  31. Instance.new('PointLight', part)
  32. part.FormFactor = Enum.FormFactor.Custom
  33. part.Size = Vector3.new(2,2,2)
  34. part.Anchored = true
  35. part.Locked = true
  36. part.CanCollide = false
  37. part.BrickColor = BrickColor.new('1003') --Really black
  38. part.TopSurface,part.BottomSurface=0,0
  39. trail(part)
  40. local point
  41.  
  42. local loop = coroutine.create(function()
  43. while true do
  44. for i=1,360,8 do -- i=1,360,8
  45. if Player.Character and not point then
  46. point = Player.Character:FindFirstChild("Torso")
  47. end
  48. if point.Parent.Name == Player.Character.Name then
  49. point = Player.Character:FindFirstChild("Torso")
  50. end
  51. if part then
  52. --Full_Loop = math.rad(i)
  53. part.CFrame = CFrame.new(point.CFrame.p)*CFrame.fromEulerAnglesXYZ(0.3,math.rad(i),0.5) * CFrame.new(0,0,-4) --CFrame.new(0,0,-4.75)
  54. end
  55. wait()
  56. end
  57. end
  58. end)
  59. coroutine.resume(loop)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement