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: lerp example?

Previous Thread :: Next Thread 
Festivereinhard2 is not online. Festivereinhard2
Joined: 08 Dec 2015
Total Posts: 587
21 Mar 2017 08:03 AM
can someone make or show me a quick lerp example where a part moves in a lineair manner?

I do not understand the wiki :/
Report Abuse
Disillusions is not online. Disillusions
Joined: 10 Jul 2011
Total Posts: 6365
21 Mar 2017 08:04 AM
local startCF = CFrame.new(0,0,0) local finishCF = CFrame.new(10,0,0) local part = workspace.Part part.CFrame = startCF for i=0, 1, 0.02 do part.CFrame = ######################## wait() end capitalist atheist
Report Abuse
Disillusions is not online. Disillusions
Joined: 10 Jul 2011
Total Posts: 6365
21 Mar 2017 08:05 AM
local startCF = CFrame.new(0,0,0)
local finishCF = CFrame.new(10,0,0)
local part = workspace.Part
part.CFrame = startCF
for i=0, 1, 0.02 do
part.CFrame = startCF : Lerp ( finishCF , i)
wait()
end



capitalist atheist
Report Abuse
odem074 is not online. odem074
Joined: 02 Jun 2013
Total Posts: 277
21 Mar 2017 08:51 AM
startPoint = game.Workspace.StartPoint endPoint = game.Workspace.EndPoint for i = 1, 10 do ####################################### 1) wait() end 1,976 lol i'm pathetic
Report Abuse
odem074 is not online. odem074
Joined: 02 Jun 2013
Total Posts: 277
21 Mar 2017 08:51 AM
wow^


1,976 lol i'm pathetic
Report Abuse
KannaKamui is not online. KannaKamui
Joined: 01 Apr 2012
Total Posts: 238
21 Mar 2017 10:38 AM
local p=Instance.new'Part'
p.Anchored=truw
p.Parent=workspace

local spin=0

game:GetService'RunService'.Heartbeat:Connect(function()
spin=spin+1
p.CFrame=p.CFrame:Lerp(p.CFrame*CFrame.Angles(0,0
math.rad(spin),0),.15)
end)
Report Abuse
KannaKamui is not online. KannaKamui
Joined: 01 Apr 2012
Total Posts: 238
21 Mar 2017 10:39 AM
Whoops, remove the 0 before the math.rad
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