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 » Scripting Helpers
Home Search
 

[ Content Deleted ]

Previous Thread :: Next Thread 
Spectrumz is not online. Spectrumz
Joined: 22 Mar 2011
Total Posts: 4338
09 Jul 2011 05:45 PM
I tried doing this:

print(game.Workspace.Part.CFrame.Angles.X)

But the output gave me THIS:

Sat Jul 09 17:41:17 2011 - Angles is not a valid member
Sat Jul 09 17:41:17 2011 - Remote Url, line 1 stack end
Sat Jul 09 17:41:17 2011 - Remote Url, line 1 stack end

What I want to do is find out the X value of CFrame.Angles, or CFrame.fromEulerAnglesXYZ, as shown below:

game.Workspace.Part.CFrame = CFrame.new(5, 5, 5,) * CFrame.Angles(math.rad(90), --[[this one to the left--]] math.rad(0), math.rad(0))

I want to be able to print the X value of CFrame.Angles to the output, in simple terms.
Report Abuse
Spectrumz is not online. Spectrumz
Joined: 22 Mar 2011
Total Posts: 4338
09 Jul 2011 05:51 PM
Only one view :3
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
09 Jul 2011 05:52 PM
part.CFrame:ToEulerAnglesXYZ()
Report Abuse
Spectrumz is not online. Spectrumz
Joined: 22 Mar 2011
Total Posts: 4338
09 Jul 2011 05:57 PM
@AgentFireFox

print(game.Workspace.Igloopart37.CFrame:ToEulerAnglesXYZ())

> print(game.Workspace.Igloopart37.CFrame:ToEulerAnglesXYZ())
Sat Jul 09 17:56:44 2011 - ToEulerAnglesXYZ is not a valid member
Sat Jul 09 17:56:44 2011 - Remote Url, line 1 stack end
Sat Jul 09 17:56:44 2011 - Remote Url, line 1 stack end

D:
Report Abuse
myrco919 is not online. myrco919
Joined: 12 Jun 2009
Total Posts: 13241
09 Jul 2011 06:04 PM
[ Content Deleted ]
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
09 Jul 2011 06:05 PM
Hmm. The T might be lower-case... X_X
It is...


part.CFrame:toEulerAnglesXYZ()
Report Abuse
myrco919 is not online. myrco919
Joined: 12 Jun 2009
Total Posts: 13241
09 Jul 2011 06:05 PM
[ Content Deleted ]
Report Abuse
myrco919 is not online. myrco919
Joined: 12 Jun 2009
Total Posts: 13241
09 Jul 2011 06:09 PM
[ Content Deleted ]
Report Abuse
Spectrumz is not online. Spectrumz
Joined: 22 Mar 2011
Total Posts: 4338
09 Jul 2011 06:11 PM
> print(game.Workspace.Igloopart37.CFrame:toEulerAnglesXYZ())
-3.1415927410126 1.0471974611282 -3.1415927410126

Is there a way to round these numbers to the nearest hundredth? When CFraming, I usually use the number in the tenth place and the hundredth place.
Report Abuse
myrco919 is not online. myrco919
Joined: 12 Jun 2009
Total Posts: 13241
09 Jul 2011 06:16 PM
[ Content Deleted ]
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
09 Jul 2011 06:37 PM
function round(num, base)
return math.floor(0.5 + math.abs(num)/base)*base*math.abs(num)/num
end

print(
round(-3.1415927410123, 0.01)
)
--> -3.14
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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