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: someone good at math help me please

Previous Thread :: Next Thread 
Qorm is not online. Qorm
Joined: 25 Jul 2010
Total Posts: 1650
22 May 2015 03:37 PM
ok so im not the best at math so help would be appreciated

how would i increment the base of a part to floor1 perfectly? for example:

for i=base.Position.Y,floor1.Position.Y,0.01 do
p.CFrame=p.CFrame*CFrame.new(0,0.01,0)
wait()
end

then the base would move to floor1 with 0.01 increment. what im trying to figure out is how to move the base to floor1 perfectly incremented, sort of like a quadratic function

this is a terrible explanation so yeah ask questions if your confused
Report Abuse
Unplane is not online. Unplane
Joined: 24 Mar 2015
Total Posts: 38
22 May 2015 04:24 PM
I have a question what does p = ?
Report Abuse
rayk999 is not online. rayk999
Joined: 18 Feb 2011
Total Posts: 4705
22 May 2015 04:26 PM
Lol, "quadratic function"
Report Abuse
rayk999 is not online. rayk999
Joined: 18 Feb 2011
Total Posts: 4705
22 May 2015 04:28 PM
So what are you trying to do? Move the part "p" to the CFrame of floor1?
Report Abuse
Unplane is not online. Unplane
Joined: 24 Mar 2015
Total Posts: 38
22 May 2015 04:29 PM
I love how he didn't even specify what p equals.

Also, lol @quadratic function


:P
Report Abuse
rayk999 is not online. rayk999
Joined: 18 Feb 2011
Total Posts: 4705
22 May 2015 04:31 PM
Well, if you want it perfect, use a CFrame interpolator or :Lerp().
I'll just use Lerp for now

for i = 0, 1, .01 do
wait()
p.CFrame = CFrame.new(P.Position:Lerp(floor1.Position. i))
end
Report Abuse
Qorm is not online. Qorm
Joined: 25 Jul 2010
Total Posts: 1650
22 May 2015 04:58 PM
"how would i increment the base of a part to floor1 perfectly?"

'p' is the base
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
22 May 2015 05:00 PM
Like, smoothly?

pos = posStart + (posEnd - posStart) * (duration/currentTime)^4
Report Abuse
buildersteven4 is not online. buildersteven4
Joined: 08 May 2009
Total Posts: 1325
22 May 2015 05:36 PM
I'm tired so i could be wrong. but don't you mean this?

pos = posStart + (posEnd - posStart) * (currentTime/duration)^4
Report Abuse
instawin is not online. instawin
Joined: 04 Jun 2013
Total Posts: 8777
22 May 2015 05:38 PM
you could take the easy way out (BodyPosition)

it would only work i think if you aren't moving a whole model, but it didn't look like you were anyway
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
23 May 2015 03:01 AM
Yeah I meant (t/d)^4
Report Abuse
powerhotmail123 is not online. powerhotmail123
Joined: 11 Apr 2011
Total Posts: 5041
23 May 2015 05:00 AM
What is this? A tweening part thing?

Enjoying your stay at the Scripters Forum? Join this! http://www.roblox.com/My/Groups.aspx?gid=2582784
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