for i, v in pairs(FolderBeam:GetChildren()) do
if v.Name ~= "BeamIn" and v.Name ~= "BeamOut" then
local goal = {}
goal.Size = v.Size + Vector3.new(200,0,0)
--goal.CFrame = v.CFrame * CFrame.new(100,0,0)
while true do
goal.CFrame += goal.CFrame.LookVector * 100
wait(1)
end
goal.Anchored = true
Humanoid.AutoRotate = false
local info = TweenInfo.new(6, Enum.EasingStyle.Sine)
local tween = TweenService:Create(v,info,goal)
tween:Play()
end
end
end)
I edited my previous post and provided the code.
You were close but you forgot that it is using TweenService so roblox will handle the positioning for you.
All you have to provide is the final destination.
Since you use TweenService, if the player rotates while the beam is playing, it will not react for it but this will fix the current issue.
I’m going to recommend to try and not use TweenService for CFraming the beam as you aren’t able to change the final CFrame destination on the fly. (example: Player rotates as you noticed)
I recommend using RunService.Heartbeat or a while true do loop so you are able to modify the CFrame on the fly.
(I wish you luck on your project but it is 12am here and I got to get some sleep).
By the way, go ahead and revert the code I gave you so it is easier for others to assist you.