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

how to know where to put my cylinder of my kamehameha to?

Asked by 5 years ago

I'm trying to make my kamehameha go in front of me but instead it's going all around the map.

        launch = Instance.new('Part', ctr)
        launch.Shape = 'Cylinder'
        launch.Size = Vector3.new(75, 5, 5)
        launch.CFrame = CFrame.new((42 + ctr:FindFirstChild('Torso').CFrame.x), ctr.Torso.CFrame.y, 0)
        launch.BrickColor = BrickColor.new('Toothpaste')
        launch.Material = 'Neon'
        launch.CanCollide = false
        launch.Anchored = true
        launch.CFrame = CFrame.new(launch.CFrame.Position, m.Hit.Position)

This is the script I'm using I need to find out how to make it go right in front of my torso.

0
make a offset User#23365 30 — 5y
0
im not good with CFrames and welding HappyTimIsHim 652 — 5y
0
a vector3 offset User#23365 30 — 5y
0
and vector3 HappyTimIsHim 652 — 5y

1 answer

Log in to vote
0
Answered by
pidgey 548 Moderation Voter
5 years ago

Make an offset. The offset relative to the Torso's CFrame. That should be -42 in the Z axis judging by your code.

launch.CFrame = Torso.CFrame * CFrame.new(0, 0, -42)
0
k HappyTimIsHim 652 — 5y
Ad

Answer this question