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: Undesired y-axis position change

Previous Thread :: Next Thread 
AxeOfMen is not online. AxeOfMen
Joined: 14 Dec 2011
Total Posts: 196
25 Feb 2012 01:06 PM
I have a block that is moved around by changing its position via script. I want it to float close to the ground and to be able to stand on it and ride it as it moves. Whenever I stand on it, it moves up above my head. What should I do to prevent it from moving on the y-axis when i step on it?
Report Abuse
nate890 is not online. nate890
Joined: 22 Nov 2008
Total Posts: 21686
25 Feb 2012 01:08 PM
It's going above your head because you're changing the position, instead of the cframe.

part.Position=Vector3.new(0,0,0)
rather
part.CFrame=CFrame.new(0,0,0)

"Bro five! Wear this to let everyone know you think they deserve a high five."
Report Abuse
AxeOfMen is not online. AxeOfMen
Joined: 14 Dec 2011
Total Posts: 196
25 Feb 2012 01:21 PM
Thanks for your response. When I change the CFrame instead of the Position, it does not move above my head, so that's good. But now I can't ride on the block as it moves. Any advice?
Report Abuse
stravant is not online. stravant
Forum Moderator
Joined: 22 Oct 2007
Total Posts: 2893
25 Feb 2012 01:23 PM
Use the body* objects to move it rather than directly moving it, which confuses the physics.
Report Abuse
Trioxide is not online. Trioxide
Joined: 29 Mar 2011
Total Posts: 32902
25 Feb 2012 01:39 PM
[ Content Deleted ]
Report Abuse
stravant is not online. stravant
Forum Moderator
Joined: 22 Oct 2007
Total Posts: 2893
25 Feb 2012 01:45 PM
Like, BodyPosition, BodyVelocity, etc There's a bunch of objects whose names start with "Body" for doing that sort of thing.
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