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

How do I make a laser go in the direction that the player is looking?

Asked by 5 years ago
Edited 5 years ago

I'm trying to make a laser that goes in the direction the player is looking

for i = 1,25 do

        ball.Position = ball.Position + Vector3.new(0,0,0) --laser projectile,its this part i need to in the direction of the player is looking 

(i just tryed with vector3 doing this, but I realized that it did not work out)

        mash.Scale = mash.Scale + Vector3.new(0,0,2) --laser mesh
        ball.Transparency = ball.Transparency + 0.1



        wait(0.0001)

end

0
Post your code. We don't help users without code Rare_tendo 3000 — 5y
0
lookvector can come in handy lol greatneil80 2647 — 5y

1 answer

Log in to vote
-1
Answered by 5 years ago

Just use character.HumanoidRootPart.CFrame.LookVector * (the power you want).

0
This should be a comment. User#19524 175 — 5y
Ad

Answer this question