I have an attachment that, when the function is called, should move to the position of another attachment, thereby showing the beam, but the attachment moves and the beam is not shown
function module.AppairLightsaber(char)
local lightsaber = workspace:FindFirstChild("Core").Lightsabers:FindFirstChild(char.Name);
if char then
if lightsaber then
local startatt = lightsaber:FindFirstChild("Blade"):FindFirstChild("Glow").Start;
local moveatt = lightsaber:FindFirstChild("Blade"):FindFirstChild("Glow").Move;
local endatt = lightsaber:FindFirstChild("Blade"):FindFirstChild("Glow").End;
local blade = lightsaber:FindFirstChild("Blade"):FindFirstChild("Blade");
local lightpoint = lightsaber:FindFirstChild("Blade"):FindFirstChild("Glow").Light;
game:GetService("TweenService"):Create(blade,TweenInfo.new(.1),{Transparency = 0}):Play();
for i = 0,1,.1 do
local movepos = lerp(startatt.WorldPosition,endatt.WorldPosition,i);
moveatt.WorldPosition = movepos;
task.wait();
end
lightpoint.Enabled = true;
end
end
end