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
 

Re: Trying to figure this out..

Previous Thread :: Next Thread 
orca101 is not online. orca101
Joined: 11 Sep 2009
Total Posts: 6624
24 Jan 2012 12:52 PM
How can you make a model levitateon Y, but beable to move freely on X and Z?
Report Abuse
orca101 is not online. orca101
Joined: 11 Sep 2009
Total Posts: 6624
24 Jan 2012 12:54 PM
Levitate*
Report Abuse
pokelord910 is not online. pokelord910
Joined: 26 May 2009
Total Posts: 1045
24 Jan 2012 12:55 PM
so you mean have a constant position x studs above the ground, and be able to move along the other axis freely???
Report Abuse
orca101 is not online. orca101
Joined: 11 Sep 2009
Total Posts: 6624
24 Jan 2012 12:56 PM
^ Exactly.
Report Abuse
superior is not online. superior
Joined: 13 Apr 2008
Total Posts: 1662
24 Jan 2012 01:16 PM
while wait(1) do
a.Position + Vector3.new(0,1,0) --Add your own increment.
end
Report Abuse
superior is not online. superior
Joined: 13 Apr 2008
Total Posts: 1662
24 Jan 2012 01:17 PM
And of course define a..
Report Abuse
orca101 is not online. orca101
Joined: 11 Sep 2009
Total Posts: 6624
24 Jan 2012 01:18 PM
@Superior
But wouldn't that only work with one part?
Report Abuse
Ravenshield is not online. Ravenshield
Joined: 21 Nov 2007
Total Posts: 4143
24 Jan 2012 01:20 PM
Superior, that would make it escalate constantly. And it doesn't work as it is right now.

I'd prefer not using loops for this - try some of the physics-objects of ROBLOX (BodyPosition, BodyGyro, BodyForce. You name it)

However, a loop could look like this:

local height = 4 -- constant.

while true do
script.Parent.Position = Vector3.new(script.Parent.Postition.x, height, scirpt.Parent.Position.z)
wait()
end

It's very inefficient.
As I said, I prefer using BodyPositions or such for this. :) But you all decide what you prefer.
Report Abuse
Ravenshield is not online. Ravenshield
Joined: 21 Nov 2007
Total Posts: 4143
24 Jan 2012 01:21 PM
If you're going to do it with an entire model, I'd definitely go for some of the physics-objects. You could always _try_ BodyPosition.
Report Abuse
orca101 is not online. orca101
Joined: 11 Sep 2009
Total Posts: 6624
24 Jan 2012 01:25 PM
@Raven Well, I tried using bodyposition, but my model would always tip up as it moved along. Any idea what the values on the bodyposition could look like to stop that?
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