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: Super Easy Question

Previous Thread :: Next Thread 
wentman is not online. wentman
Joined: 13 Aug 2013
Total Posts: 130
19 Jul 2017 11:37 PM
I'm pretty stupid at Lua, but how do I do math and change a X position of a part
E.g: X pos : 14-3
Report Abuse
wentman is not online. wentman
Joined: 13 Aug 2013
Total Posts: 130
19 Jul 2017 11:43 PM
loll
Report Abuse
nullfeels is not online. nullfeels
Joined: 31 Mar 2017
Total Posts: 1215
19 Jul 2017 11:44 PM
Roblox doesn't allow setting it directly so you need to do this:

local vec1 = Vector3.new(14,0,0)
vec1 = vec1 - Vector3.new(3,0,0)
Report Abuse
Whoami102 is online. Whoami102
Joined: 25 Jul 2013
Total Posts: 131
20 Jul 2017 12:31 AM
You can change the position using Vectors if you want it to go to an exact place, or you can change the CFrame and translate the part (X) studs in the X direction.


print("You probably pronounced my name wrong")
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