generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: CFrame rotation problem

Previous Thread :: Next Thread 
affectless is not online. affectless
Joined: 28 Dec 2014
Total Posts: 1084
01 Feb 2015 11:03 AM
PUnderbarrel.Base.CFrame = CFrame.new(primary.UnderbarrelBase.Position) * CFrame.Angles(primary.UnderbarrelBase.Rotation)

What is wrong with this line of code? The error says something about bad argument #1
Report Abuse
affectless is not online. affectless
Joined: 28 Dec 2014
Total Posts: 1084
01 Feb 2015 11:07 AM
sdfghjk
Report Abuse
Paramedic4 is not online. Paramedic4
Joined: 23 Jan 2011
Total Posts: 5934
01 Feb 2015 11:13 AM
I think I found the problem:

PUnderbarrel.Base.CFrame = CFrame.new(primary.Underbarrel.Base.Position) * CFrame.Angles(primary.Underbarrel.Base.Rotation)
Report Abuse
affectless is not online. affectless
Joined: 28 Dec 2014
Total Posts: 1084
02 Feb 2015 08:30 AM
No, my hierarchy was correct.
Report Abuse
affectless is not online. affectless
Joined: 28 Dec 2014
Total Posts: 1084
02 Feb 2015 09:02 AM
BAH
Report Abuse
affectless is not online. affectless
Joined: 28 Dec 2014
Total Posts: 1084
02 Feb 2015 09:06 AM
BLAH
Report Abuse
affectless is not online. affectless
Joined: 28 Dec 2014
Total Posts: 1084
02 Feb 2015 09:12 AM
fdgsfggggg
Report Abuse
affectless is not online. affectless
Joined: 28 Dec 2014
Total Posts: 1084
02 Feb 2015 09:15 AM
bfdjakfffff
Report Abuse
affectless is not online. affectless
Joined: 28 Dec 2014
Total Posts: 1084
02 Feb 2015 09:20 AM
ffffff
Report Abuse
affectless is not online. affectless
Joined: 28 Dec 2014
Total Posts: 1084
02 Feb 2015 09:27 AM
>:[
Report Abuse
affectless is not online. affectless
Joined: 28 Dec 2014
Total Posts: 1084
02 Feb 2015 09:30 AM
cmon its one line of code
Report Abuse
RoflBread is not online. RoflBread
Joined: 18 Jun 2009
Total Posts: 3803
02 Feb 2015 09:40 AM
It's possible that CFrame.Angles doesn't accept a vector as an argument. And anyway, part.Rotation is in degrees, not radians like CFrames.

Moreover, if you're multiplying the position and rotation parts of the same matrix together you're going to get the original thing. Why not just do

PUnderbarrel.Base.CFrame = primary.UnderbarrelBase.CFrame

Report Abuse
affectless is not online. affectless
Joined: 28 Dec 2014
Total Posts: 1084
02 Feb 2015 09:44 AM
I thought it would error because I tried something similar that did error. :/
Thanks so much!
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image