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: how to change the CFrame, and not make a new one

Previous Thread :: Next Thread 
zeon23445 is not online. zeon23445
Joined: 25 Jan 2009
Total Posts: 609
25 Jun 2013 09:45 AM
im trying to make it so i can change a bricks CFrame, but not use CFrame.new because it remakes the CFrame.

how do i change an objects CFrame in 1 line without using CFrame.new?
Report Abuse
sbk28 is not online. sbk28
Joined: 15 Nov 2008
Total Posts: 2528
25 Jun 2013 09:46 AM
Part.CFrame = Part.CFrame * CFrame.new(x, y, z)

"What's sad is we're goofing around and we've gotten further than when we were trying" - WatchfulEzio
Report Abuse
zeon23445 is not online. zeon23445
Joined: 25 Jan 2009
Total Posts: 609
25 Jun 2013 09:53 AM
sorry that didnt work. the brick completely disappeared even though it was supposed to move a couple inches
Report Abuse
sbk28 is not online. sbk28
Joined: 15 Nov 2008
Total Posts: 2528
25 Jun 2013 09:54 AM
What did you use for your code then

"What's sad is we're goofing around and we've gotten further than when we were trying" - WatchfulEzio
Report Abuse
IAmReallyAwesome is not online. IAmReallyAwesome
Joined: 05 Mar 2010
Total Posts: 7371
25 Jun 2013 09:54 AM
Part.CFrame = Vector3.new(x,y,z)

(only for addition and subtraction)
Report Abuse
zeon23445 is not online. zeon23445
Joined: 25 Jan 2009
Total Posts: 609
25 Jun 2013 09:57 AM
no thats not how it worked either. heres my code:

Object1.CFrame = Object1.CFrame * CFrame.new(Object1.Position - Pose)
Report Abuse
sbk28 is not online. sbk28
Joined: 15 Nov 2008
Total Posts: 2528
25 Jun 2013 09:59 AM
No no zeo

Object1.CFrame = Object1.CFrame * CFrame.new(0, 1, 0)

would move the block up 1 stud on the blocks axis

"What's sad is we're goofing around and we've gotten further than when we were trying" - WatchfulEzio
Report Abuse
zeon23445 is not online. zeon23445
Joined: 25 Jan 2009
Total Posts: 609
25 Jun 2013 10:00 AM
whats the difference between mine and yours?
Report Abuse
sbk28 is not online. sbk28
Joined: 15 Nov 2008
Total Posts: 2528
25 Jun 2013 10:02 AM
Object1.CFrame = Object1.CFrame * CFrame.new(Object1.Position - Pose)

this will take the bricks current CFRame

and ADD TO IT

Object1.Position - Pose

ok
"What's sad is we're goofing around and we've gotten further than when we were trying" - WatchfulEzio
Report Abuse
zeon23445 is not online. zeon23445
Joined: 25 Jan 2009
Total Posts: 609
25 Jun 2013 10:04 AM
same difference, the brick disapears. its in a loop 1, 100. does that effect it?
Report Abuse
sbk28 is not online. sbk28
Joined: 15 Nov 2008
Total Posts: 2528
25 Jun 2013 10:08 AM
can you get your script to have

print(Object1.Position - Pose)

in the loop and copy paste it

"What's sad is we're goofing around and we've gotten further than when we were trying" - WatchfulEzio
Report Abuse
zeon23445 is not online. zeon23445
Joined: 25 Jan 2009
Total Posts: 609
25 Jun 2013 10:09 AM
but all it does is print what i want the position to be. it doesnt change it? what do you mean?
Report Abuse
sbk28 is not online. sbk28
Joined: 15 Nov 2008
Total Posts: 2528
25 Jun 2013 10:11 AM
To give you an idea

Object1.CFrame = Object1.CFrame * CFrame.new(1, 5, 10)

it would move the object from lets say

CFrame.p = 5, 9, 6

to

CFrame.p = 1, 14, 16



"What's sad is we're goofing around and we've gotten further than when we were trying" - WatchfulEzio
Report Abuse
sbk28 is not online. sbk28
Joined: 15 Nov 2008
Total Posts: 2528
25 Jun 2013 10:11 AM
6, 14 16

sorry im tired today okay

"What's sad is we're goofing around and we've gotten further than when we were trying" - WatchfulEzio
Report Abuse
zeon23445 is not online. zeon23445
Joined: 25 Jan 2009
Total Posts: 609
25 Jun 2013 10:12 AM
ahh i get it. thanks
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