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.new Vector3.new

Previous Thread :: Next Thread 
COMMANDERREX12345345 is not online. COMMANDERREX12345345
Joined: 18 Jun 2009
Total Posts: 1316
04 Apr 2013 09:56 PM
everytime I try to do this:

part.CFrame = secondPart.CFrame + CFrame.new(3, 0, 0)

it says Vector3 expected, But I'm trying to change the cframe position...
Report Abuse
EchoReaper is not online. EchoReaper
Joined: 14 Oct 2008
Total Posts: 4323
04 Apr 2013 10:01 PM
part.CFrame = secondPart.CFrame + Vector.new(3, 0, 0)

A CFrame is a Vector3 but with 12 numbers at the end of it that tell rotation. Think of a Vector3 as a position, and the CFrame as the position plus rotation. You're adding position to this, so you'd use Vector3.
Report Abuse
EchoReaper is not online. EchoReaper
Joined: 14 Oct 2008
Total Posts: 4323
04 Apr 2013 10:02 PM
CFrame is a Vector3 with 9 numbers at the end* 12 with rotation + position, my bad.
Report Abuse
COMMANDERREX12345345 is not online. COMMANDERREX12345345
Joined: 18 Jun 2009
Total Posts: 1316
04 Apr 2013 10:05 PM
but, I want this certain model to appear beside you each time. Everytime I rotate, the model appears in different places.

Here's what I used:

clon.Torso.CFrame = game.Players.LocalPlayer.Character.Torso.CFrame + Vector3.new(3, 0, 0)

it appears at different places...
Report Abuse
COMMANDERREX12345345 is not online. COMMANDERREX12345345
Joined: 18 Jun 2009
Total Posts: 1316
04 Apr 2013 10:08 PM
oh, nevermind. *CFrame seamed to do the trick.
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