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
 

Slowing down movement?

Previous Thread :: Next Thread 
UnAdmin is not online. UnAdmin
Joined: 10 Jul 2012
Total Posts: 4706
01 Apr 2014 04:37 PM
I am trying to make this go slower without losing its smoothness (so increasing wait will not work). How can I do it? Dividing z will just reduce its distance.

local defaultCFrame = script.Parent.CFrame
while wait(1/5) do
for i = 1,360 do
local z = math.sin(i)
script.Parent.CFrame = defaultCFrame + Vector3.new(0,0,z)
wait(1/30)
end
end
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
01 Apr 2014 04:44 PM
faster update time (change the wait(1/5) to like, 1/25 and make z/5)
Report Abuse
UnAdmin is not online. UnAdmin
Joined: 10 Jul 2012
Total Posts: 4706
01 Apr 2014 04:46 PM
Even though what you said is exactly what I said not to do, I got the answer anyway.

local defaultCFrame = script.Parent.CFrame
local speed = 25
while wait(1/5) do
for i = 1,360*speed do
local z = math.sin(i/speed)
script.Parent.CFrame = defaultCFrame + Vector3.new(0,0,z)
wait(1/30)
end
end
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
01 Apr 2014 04:57 PM
Oops, I didn't read your post correctly. My bad
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