Trying to make a Object not face backwards when looking at Object2. Is there a way to make the Part not look backwards when facing Part2?
-- Code
enabled = true
local Speed = script.Parent.Speed.Value
local Gun = script.Parent.ViewBlock
while wait(Speed) do
local closest = nil
local dist = script.Parent.Range.Value
local Damage = script.Parent.Damage
for _,bloons in pairs(workspace.Bloons:GetChildren()) do
if bloons then
local mag = (Turret.Position-bloons.Position).magnitude
if mag < dist then
closest = bloons
dist = mag
end
end
end
if closest and enabled then
Gun.CFrame = CFrame.new(Gun.Position,closest.Position);
