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: Why does this not work?

Previous Thread :: Next Thread 
michaelaqz4 is not online. michaelaqz4
Joined: 23 Sep 2009
Total Posts: 1940
23 Oct 2012 06:43 PM
script.Parent.CFrame.Y = CFrame.new(script.Parent.CFrame.Y - 0.5555)

I also tried

script.Parent.CFrame.Y = (script.Parent.CFrame.Y - 0.5555)
Report Abuse
XxChopSlaperxX is not online. XxChopSlaperxX
Joined: 09 Nov 2010
Total Posts: 3112
23 Oct 2012 06:46 PM
CFrame = script.Parent.CFrame * CFrame.new(0,-0.5555,0)
Report Abuse
michaelaqz4 is not online. michaelaqz4
Joined: 23 Sep 2009
Total Posts: 1940
23 Oct 2012 06:48 PM
@Pork
I don't need to set the X and Z at 0, I need them to not change
Report Abuse
REDALERT2 is not online. REDALERT2
Joined: 25 Jul 2008
Total Posts: 679
23 Oct 2012 06:49 PM
script.Parent.CFrame = script.Parent.CFrame + Vector3.new(0,0.5555,0)
Report Abuse
XxChopSlaperxX is not online. XxChopSlaperxX
Joined: 09 Nov 2010
Total Posts: 3112
23 Oct 2012 06:49 PM
It'll do what you want it to do

CFrame * CFrame

Is basically adding it.

You're adding 0 on the X/Z, but subtracting on the Y axis
Report Abuse
REDALERT2 is not online. REDALERT2
Joined: 25 Jul 2008
Total Posts: 679
23 Oct 2012 06:50 PM
script.Parent.CFrame = script.Parent.CFrame + Vector3.new(0,-0.5555,0)--Forgot to add in the negative sign...
Report Abuse
michaelaqz4 is not online. michaelaqz4
Joined: 23 Sep 2009
Total Posts: 1940
23 Oct 2012 06:53 PM
Thank you both very much :D
Report Abuse
REDALERT2 is not online. REDALERT2
Joined: 25 Jul 2008
Total Posts: 679
23 Oct 2012 06:57 PM
@XxChop, that actually subtracts off of the object's y-axis, which points between the center of the bottom surface and the center of the top surface of the brick. Your method in many cases can make the brick move downward in a tilted way, sideways, or even upwards. michael likely just wants the brick to move according the the world's axis instead of the brick's axis.
Report Abuse
XxChopSlaperxX is not online. XxChopSlaperxX
Joined: 09 Nov 2010
Total Posts: 3112
23 Oct 2012 07:11 PM
Vector3 stuff isn't my thing, so I'm guessing you're right.
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