Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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 comment

1 answer

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.

6 comments

1

You're setting the CFrame to a Vector3 value.

0

Oh

0

Oh

0

Stop mis capitalizing everything.

0

Also this wouldn't work anyways.

0

Okay Its Updated

This discussion is preserved as it was. New answers, comments, and votes are closed.