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

How do I get it so my orientation faces my mouse?

Asked by 6 years ago

Im pretty confused on how to make my kamehameha cylinder part to face my mouse

launch.Orientation = Vector3.new(0, m.Hit.y, 0)

I have no idea but if I should use CFrame instead tell meh. P.S. I'm a dbz fan.

0
local mouse = game.Players.LocalPlayer:GetMouse() ReaperMr 0 — 4y
0
ITS LITERALLY A YEAR AGO HappyTimIsHim 652 — 4y
0
launch.Orientation = Vector3.new(Mouse.Hit.p) ReaperMr 0 — 4y
0
bro HappyTimIsHim 652 — 4y
0
lol ReaperMr 0 — 4y

1 answer

Log in to vote
1
Answered by 6 years ago
Edited 6 years ago

use the CFrame.new(vector pos, vector lookAt) constructor which takes in a vector3 value as the position and another value to look at.

launch.CFrame = CFrame.new(launch.CFrame.Position, m.Hit.Position)
Ad

Answer this question