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 » Scripters
Home Search
 

CFrame Help

Previous Thread :: Next Thread 
StratusNinja is not online. StratusNinja
Joined: 04 Nov 2012
Total Posts: 6144
14 Jul 2015 11:09 AM
Originally, I had used the first set of code to move a platform. However, this made all the bricks look choppy as it moved.

function holodoorUp()
for i=1, 200 do
holodoor:TranslateBy(Vector3.new(0,-0.2,0))
wait(.1)
end

It was suggested I use the SetPrimaryPartCFrame method. This works, but not in the way I had planned. Instead of moving it down gradually like the first method, it just instantly places it at the point (0,-0.2,0).

How would I instead get it to move down 0.2 studs at a time?

function holodoorDown()
for i=1, 200 do
holodoor:SetPrimaryPartCFrame(CFrame.new(0,-0.2,0))
wait(.1)
end
end

StratusNinja || Emperor of Stratus || Watch my stream - http://twitch.tv/stratusninja
Report Abuse
DivinePheonix is not online. DivinePheonix
Joined: 30 Mar 2011
Total Posts: 11190
14 Jul 2015 11:16 AM
holodoor:SetPrimaryPartCFrame(CFrame.new(0,-0.2,0))
Look at this line and the Y value. You're instantly setting it to -.2, if you want it to translate bit by bit, consider setting a variable for Y and then decreasing/increasing it in the direction you want to go.
Report Abuse
maxomega3 is not online. maxomega3
Joined: 11 Jun 2010
Total Posts: 10668
14 Jul 2015 12:04 PM
Please don't repost. I gave you the solution



Hello World!
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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