There are two variations of the code i can use, but the second one makes the blue block aim in the right direction, but far off. Can someone explain whats happening? Im Just starting to learn CFrames, so i have no clue.
First scenario: https://imgur.com/a/3ZcGrwH
local Subject = script.Parent.Subject
local Target = script.Parent.Target
local i = 5
while wait() do
i = i + 1
print(i)
local ATP = Vector3.new(90, i, 10)
Subject.CFrame = CFrame.new(ATP,Target.Position)
if i > 80 then
i = 5
end
end
Second Scenario: https://imgur.com/a/aFqqpnp
local Subject = script.Parent.Subject
local Target = script.Parent.Target
local i = 5
while wait() do
i = i + 1
print(i)
local ATP = Vector3.new(90, 5, 10)
Subject.CFrame = CFrame.new(ATP,Target.Position) + Vector3.new(0, i, 0)
if i > 80 then
i = 5
end
end

1 comment
Can you shut up?