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
 

Re: CFrame

Previous Thread :: Next Thread 
masterCameron101 is not online. masterCameron101
Joined: 28 Mar 2010
Total Posts: 1377
22 May 2014 05:28 AM
I don't like CFrame right now. ;_; I though I had fixed my script but when I set the position it resets the rotation. What do I do to keep the position and rotation?

t is the character's torso.

p.CFrame=CFrame.Angles(math.pi/2,0,0)
p.CFrame=CFrame.new(t.CFrame.X,t.CFrame.Y,t.CFrame.Z)

~masterCameron101, advanced Lua programmer, certified in Photoshop. Have I helped you? Don8~
Report Abuse
roxmat is not online. roxmat
Joined: 10 Jun 2011
Total Posts: 66
22 May 2014 05:31 AM
So explain more. What is this meant to do?
Report Abuse
masterCameron101 is not online. masterCameron101
Joined: 28 Mar 2010
Total Posts: 1377
22 May 2014 05:32 AM
It is supposed to rotate a part by 90 degrees and sets the position to the character's torso.

~masterCameron101, advanced Lua programmer, certified in Photoshop. Have I helped you? Don8~
Report Abuse
masterCameron101 is not online. masterCameron101
Joined: 28 Mar 2010
Total Posts: 1377
22 May 2014 05:37 AM
Hello?

~masterCameron101, advanced Lua programmer, certified in Photoshop. Have I helped you? Don8~
Report Abuse
roxmat is not online. roxmat
Joined: 10 Jun 2011
Total Posts: 66
22 May 2014 05:37 AM
Well nice job doing it like this xD: p.CFrame=CFrame.new(t.CFrame.X,t.CFrame.Y,t.CFrame.Z)

Remember CFrame is for positioning and rotation(Of course you know)

Do it like this: p.Position = t.Position --Maybe + Vector3.new(0,0,3)
Report Abuse
masterCameron101 is not online. masterCameron101
Joined: 28 Mar 2010
Total Posts: 1377
22 May 2014 05:40 AM
But wouldn't it go on the player's head?

~masterCameron101, advanced Lua programmer, certified in Photoshop. Have I helped you? Don8~
Report Abuse
roxmat is not online. roxmat
Joined: 10 Jun 2011
Total Posts: 66
22 May 2014 05:42 AM
100% no. But try to see if it is fixed. :)
Report Abuse
bradz234 is not online. bradz234
Joined: 02 Aug 2009
Total Posts: 31
22 May 2014 05:51 AM
p.CFrame=CFrame.new(t.CFrame.X,t.CFrame.Y,t.CFrame.Z) * CFrame.Angles(math.pi/2,0,0)
Report Abuse
roxmat is not online. roxmat
Joined: 10 Jun 2011
Total Posts: 66
22 May 2014 05:54 AM
Ah, Yeah I was going to suggest what brad did.

Forget mine. Use brads'
Report Abuse
masterCameron101 is not online. masterCameron101
Joined: 28 Mar 2010
Total Posts: 1377
22 May 2014 06:20 AM
Works now, ty brad.

~masterCameron101, advanced Lua programmer, certified in Photoshop. Have I helped you? Don8~
Report Abuse
bradz234 is not online. bradz234
Joined: 02 Aug 2009
Total Posts: 31
22 May 2014 06:28 AM
For the record, Im Wreckerbuster67. I got 1 day banned. :c
Report Abuse
masterCameron101 is not online. masterCameron101
Joined: 28 Mar 2010
Total Posts: 1377
22 May 2014 06:31 AM
Aww... for what? (PM me that so you don't get banned on your alt.)

~masterCameron101, advanced Lua programmer, certified in Photoshop. Have I helped you? Don8~
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