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: would this work? (CFrame lerp gui)

Previous Thread :: Next Thread 
ninjaguy77777 is not online. ninjaguy77777
Joined: 15 Oct 2011
Total Posts: 2382
12 Mar 2017 09:55 PM
this is a script inside a script


local cpart = game.Workspace.CamPart
local dest = game.Workspace.Dest
script.Parent.MouseButton1Click:connect(function()
cpart.CFrame:lerp(dest.CFrame)
end)


whats gonna work, teamwork!
Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
12 Mar 2017 09:58 PM
no

lerping accepts Start, End, Alpha

when you use method call (:) you already send the cframe using the method as Start

newCFrame = startCFrame:Lerp(EndCFrame, Alpha)

Alpha is a percentage between Start and End, at 0% (0) it will be all the way at the Start, and at 100% (1) it will be all the way at the End. Use a for loop or some sort of continuous loop to lerp it properly.
Report Abuse
ninjaguy77777 is not online. ninjaguy77777
Joined: 15 Oct 2011
Total Posts: 2382
12 Mar 2017 09:59 PM
well can i just make it when you press a gui it makes a brick tween to a destination


whats gonna work, teamwork!
Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
12 Mar 2017 10:06 PM
you can but you will need to change the percentage during the tween so you could try using a for loop to get increasingly closet to the end point
Report Abuse
ninjaguy77777 is not online. ninjaguy77777
Joined: 15 Oct 2011
Total Posts: 2382
12 Mar 2017 10:08 PM
gtg if you can write the script below


whats gonna work, teamwork!
Report Abuse
Contriox is not online. Contriox
Joined: 09 Feb 2014
Total Posts: 1970
12 Mar 2017 10:24 PM
example I made a few hours ago

https://forum.roblox.com/Forum/ShowPost.aspx?PostID=211827563
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