I adapted a free model script that creates blocks behind a player when they run. One function creates a blur (tall blocks player-sized), one function creates lightning (0.2² blocks) and one function fades them. However when the script is run only the lightning and fade functions work. There are no errors in the output. Here is the script:
tool = script.Parent
lastpoint = script.Parent.Position
leds = {}
function makeled()
local tip = script.Parent
if tip~= nil then
local off = tip.Size.z/2
local point = (tip.CFrame*CFrame.new(0, 0, -off)).p
local unit = (lastpoint - point).unit
local mag = (lastpoint - point).magnitude
if tool.Parent.Humanoid.WalkSpeed > 55 and mag>10 then
local middle = lastpoint-(unit*(mag/2))
local cf = CFrame.new(middle, point)
local l = Instance.new("Part")
l.Shape = tip.Shape
l.Name = "Zoom"
l.Anchored = true
l.CanCollide = false
l.Size = Vector3.new(tip.Size.x, tip.Size.y, mag)
l.BrickColor = BrickColor.new("Bright red")
l.Reflectance = tip.Reflectance
l.TopSurface = 0
l.Transparency = 0.8
l.BottomSurface = 0
l.Parent = tip
l.CFrame = cf
table.insert(leds, l)
lastpoint = point
end
end
end
function fade()
for i, v in pairs(leds) do
if v~= nil then
if v.Name == "electrik" then
v.Transparency = v.Transparency+0.2
elseif v.Name == "Zoom" then
v.Transparency = v.Transparency + 0.04
end
if v.Transparency>1 then
v:remove()
end
end
end
end
function makelig()
local tip = script.Parent
if tip~= nil then
local off = tip.Size.z/2
local point = (tip.CFrame*CFrame.new(0, 0, -off)).p
local unit = (lastpoint - point).unit
local mag = (lastpoint - point).magnitude
if tool.Parent.Humanoid.WalkSpeed > 55 and mag>10 then
local middle = lastpoint-(unit*(mag/2))
local cf = CFrame.new(middle, point)
local l = Instance.new("Part")
l.Shape = tip.Shape
l.Name = "electrik"
l.Anchored = true
l.CanCollide = false
l.Size = Vector3.new(0.2, 0.2, mag)
l.BrickColor = BrickColor.new("Bright yellow")
l.Reflectance = tip.Reflectance
l.Material = "Neon"
l.TopSurface = 0
l.Transparency = 0
l.BottomSurface = 0
l.Parent = tip
l.CFrame = cf
table.insert(leds, l)
lastpoint = point
end
end
end
while true do
makelig()
makeled()
wait()
fade()
wait()
end
makelig() is lightning and makeled() is blur. Can anyone help?

2 comments
#DontUseFreeModels
#IUnderstandTheScriptSoWhyNot