Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to use the CFrame.LookVector ?

Asked by 3 years ago

So, i've tried to use the CFrame.LookVector for making an explosion but i have problems with that.

Can someone help me for that ?

The script :

for i = 1, 50, 1 do
    local p = Instance.new("Part")
    local la = workspace.Baseplate
    p.Parent = workspace
    p.Anchored = true
    p.Position = Vector3.new(0, -8, 0)
    p.Color = Color3.new(1, 0, 0)
    p.CFrame = CFrame.lookAt(p.Position, la.Position)
    function f1()
        p
    end
end

it's on the

function lv()
    p
end

that i'm blocking.

0
sus Oxprem 140 — 3y
0
cool amogus reference in scripting Xapelize 2658 — 3y

1 answer

Log in to vote
0
Answered by
Xapelize 2658 Moderation Voter Community Moderator
3 years ago

Im not sure whats on your script but CFrame.LookVector is a part's front direction, the difference between cframe and lookvector is that lookvector is not a CFrame value, but a number which how many studs you want the part travels from the front direction!

Ad

Answer this question