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: i've never used CFrame.Angles before can someone explain pls

Previous Thread :: Next Thread 
SnowyKirby is not online. SnowyKirby
Joined: 15 Jan 2013
Total Posts: 68009
08 Aug 2016 05:09 PM
so im just testing it out and i made this simple script

function swingopen()
script.Parent.CFrame=CFrame.Angles(0,90,0)
end

swingopen()

but it doesnt do what i want at all

this sets the position to 0,0,0 and sets the rotation to -180, 63.38, -180


u just got litt up
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
08 Aug 2016 05:10 PM
local part = script.Parent

part.CFrame = part.CFrame * CFrame.Angles(0,math.rad(90),0)


Report Abuse
Isosta is not online. Isosta
Joined: 10 May 2015
Total Posts: 14729
08 Aug 2016 05:10 PM
script.Parent.CFrame = script.Parent.CFrame * CFrame.Angles(0,math.rad(90),0)


if you dont put math.rad, you're using radians, not degrees.


- pyth_n
Report Abuse
SnowyKirby is not online. SnowyKirby
Joined: 15 Jan 2013
Total Posts: 68009
08 Aug 2016 05:11 PM
oh i see


u just got litt up
Report Abuse
SnowyKirby is not online. SnowyKirby
Joined: 15 Jan 2013
Total Posts: 68009
08 Aug 2016 05:13 PM
if i wanted to change the cframe position but not the rotation, what would i do?


u just got litt up
Report Abuse
thedailyblarg is not online. thedailyblarg
Joined: 26 Feb 2012
Total Posts: 5506
08 Aug 2016 05:14 PM
CFrame.Angles(math.rad(x),math.rad(y),math.rad(z)) is similar to Rotation except usually local
CFrame.new(x,y,z) is the same thing as position

And to add CFrames together use the * operator
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