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

Bullet Focus Part?

Asked by
KAAK82 16
10 years ago

Could this be Changed b.Position = mouse.Hit.p to b.Position = Tool.Focus? Cos I was testing a Gun and it didn't work out well, am not sure though if thats cos of that line or not, but am asking guys, cos I dont want the Bullets to go were the Mouse is pointing... its so unrealistic!

1 answer

Log in to vote
0
Answered by
hiccup111 231 Moderation Voter
10 years ago

Where did you get the method 'Focus', for a Tool, because I can't find it.

The only reference I can find is for the Camera.

If you want the bullet to point where the gun is pointing, use the lookVector, either on the Handle/Barrel, or Right arm of your character:



bullet.CFrame = CFrame.new( --Position tool.Handle.Position + tool.Handle.CFrame.lookVector*2, -- push the position forward a little --Direction tool.Handle.CFrame.lookVector*9999999999 -- sometimes lookVec can be a lil' in-accurate )
0
I want the Bullet to be spawned at the Barrel and then shot at say, 'BarrelPos' as it's Focusing Part... if u get wat am saying... KAAK82 16 — 10y
0
Yeah, just change 'tool.Handle..' to 'tool.Barrel'. hiccup111 231 — 10y
Ad

Answer this question