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
 

Re: smooth movement

Previous Thread :: Next Thread 
yentedolfijn is not online. yentedolfijn
Joined: 16 Apr 2014
Total Posts: 276
05 Jul 2016 06:15 AM
so i made a very small script that moves a object to another place the problem is that its go from point a directly t point b so how cn i make it go smooth.

script:
------------------------------------------------------------------------------------------
game.Workspace.Ship:SetPrimaryPartCFrame(CFrame.new(0,10,0)*CFrame.Angles(0,0,0))
wait(5)
game.Workspace.Ship:SetPrimaryPartCFrame(CFrame.new(0,0,10)*CFrame.Angles(0,0,0))
Report Abuse
cntkillme1 is not online. cntkillme1
Joined: 16 Feb 2012
Total Posts: 592
05 Jul 2016 06:17 AM
local initial = CFrame.new(0, 10, 0)
local final = CFrame.new(0, 0, 10)
local ship = game.Workspace.Ship

for alpha = 0, 100, 1 do
ship:SetPrimaryPartCFrame(initial:lerp(final, alpha/10))
wait()
end

something like that?
Report Abuse
daireb is not online. daireb
Joined: 16 Nov 2012
Total Posts: 726
05 Jul 2016 06:39 AM
^ that but it should be alpha/100
Report Abuse
cntkillme1 is not online. cntkillme1
Joined: 16 Feb 2012
Total Posts: 592
05 Jul 2016 06:45 AM
woops missed a 0 haha
Report Abuse
yentedolfijn is not online. yentedolfijn
Joined: 16 Apr 2014
Total Posts: 276
05 Jul 2016 07:15 AM
yes thats what i need but how to change the speed
Report Abuse
cntkillme1 is not online. cntkillme1
Joined: 16 Feb 2012
Total Posts: 592
05 Jul 2016 07:27 AM
To increase the speed, just change the step of the numerical for loop into a higher number:

for alpha = 0, 100, 5 do -- 5x faster as before now
Report Abuse
yentedolfijn is not online. yentedolfijn
Joined: 16 Apr 2014
Total Posts: 276
05 Jul 2016 07:28 AM
ok thx
Report Abuse
yentedolfijn is not online. yentedolfijn
Joined: 16 Apr 2014
Total Posts: 276
05 Jul 2016 07:43 AM
but hopw do i rotate it
Report Abuse
cntkillme1 is not online. cntkillme1
Joined: 16 Feb 2012
Total Posts: 592
05 Jul 2016 07:47 AM
what do you want the end rotation to be? just 90 degrees around the y axis?
Report Abuse
yentedolfijn is not online. yentedolfijn
Joined: 16 Apr 2014
Total Posts: 276
05 Jul 2016 07:48 AM
i just want rotate it right and other times left and i wanna be able to edit the grades
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