KingJacko
|
  |
| Joined: 20 Jun 2008 |
| Total Posts: 3944 |
|
|
| 26 Jun 2016 06:04 AM |
I'm trying to get the bullet to rotate and be parallel to the gun
local GunDirection = Gun.CFrame.lookVector Bullet.Rotation = GunDirection
The bullet does not change rotation when i change rotation of my character.
|
|
|
| Report Abuse |
|
|
|
| 26 Jun 2016 06:11 AM |
| Bullet.Rotation = pos * CFrame.Angles(GunDirection) try this. |
|
|
| Report Abuse |
|
|
|
| 26 Jun 2016 06:12 AM |
whooops
.Rotation should be CFrame |
|
|
| Report Abuse |
|
|
KingJacko
|
  |
| Joined: 20 Jun 2008 |
| Total Posts: 3944 |
|
|
| 26 Jun 2016 10:52 AM |
| bad argument #3 to 'Angles' (number expected, got no value) |
|
|
| Report Abuse |
|
|
KingJacko
|
  |
| Joined: 20 Jun 2008 |
| Total Posts: 3944 |
|
| |
|
Hedr0n
|
  |
| Joined: 05 Jan 2016 |
| Total Posts: 1524 |
|
|
| 27 Jun 2016 06:58 AM |
| He literally just said it. Bullet.CFrame = CFrame.Angles(Gun.CFrame) |
|
|
| Report Abuse |
|
|
|
| 27 Jun 2016 07:07 AM |
Well actually:
local bullet = bullet; local bulletPosition = bullet.Position; local gun = gun; local gunDirection = gun.CFrame.lookVector;
bullet.CFrame = CFrame.new(bulletPosition, bulletPosition + gunDirection);
Matthew: "Scripting for ROBLOX intelligence? There is no intelligence in ROBLOX." Me: "LOL" |
|
|
| Report Abuse |
|
|