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

How to make a gun that shoots in front of you?

Asked by 6 years ago

I'm trying to make a gun that actually is realistic. But, I made a gun that shoots wherever you click your mouse. How do you make a gun that shoots the way you face?

1 answer

Log in to vote
-2
Answered by 6 years ago
Edited 6 years ago

Check the lookvector of the players uppertorso

local tool = script.Parent
local Bullet = --What ever you have as the bullet
local Torso = game.player.localplayer:WaitForChild("UpperTorso")-- if R6 then ("Torso")
Bullet.CFrame = CFrame.new(Bullet.Position,Torso.CFrame.lookVector)

And That should be it you also have to have then mouseclick event.

1
You're setting the CFrame to a Vector3 value. CootKitty 311 — 6y
0
Oh NerdBow_Gaming 41 — 6y
0
Oh NerdBow_Gaming 41 — 6y
0
Stop mis capitalizing everything. hiimgoodpack 2009 — 6y
View all comments (2 more)
0
Also this wouldn't work anyways. CootKitty 311 — 6y
0
Okay Its Updated NerdBow_Gaming 41 — 6y
Ad

Answer this question