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: Vector3 Help

Previous Thread :: Next Thread 
Bylocks is not online. Bylocks
Joined: 27 Mar 2012
Total Posts: 773
29 Apr 2017 10:37 AM
How can I change one value in a vector3, say the y value
Report Abuse
Gomlsauresrex is not online. Gomlsauresrex
Joined: 25 Mar 2016
Total Posts: 3588
29 Apr 2017 10:39 AM
local v3={
x=0,
y=any integer,
z=0
}

script.Parent.Position=Vector3.new(v3.x, v3.y, v3.z)
Report Abuse
Dankvisky is not online. Dankvisky
Joined: 04 Mar 2012
Total Posts: 5430
29 Apr 2017 10:40 AM
Vector3.new(currentvector.X,newYValue,currentvector.Z)

currentvector is just the current vector


Alternatively you could do:
currentvector + Vector3.new(0,how much to add to Y,0)


Report Abuse
Gomlsauresrex is not online. Gomlsauresrex
Joined: 25 Mar 2016
Total Posts: 3588
29 Apr 2017 10:40 AM
or maybe

script.Parent.Position.Y=1
Report Abuse
Bylocks is not online. Bylocks
Joined: 27 Mar 2012
Total Posts: 773
29 Apr 2017 10:44 AM
workspace.Placing.barricade = Vector3.new(currentvector.X,3.928,currentvector.Z)

it says i need to define current vector
Report Abuse
Dankvisky is not online. Dankvisky
Joined: 04 Mar 2012
Total Posts: 5430
29 Apr 2017 10:45 AM
@Goml
Wasnt it only readable?


Report Abuse
Bylocks is not online. Bylocks
Joined: 27 Mar 2012
Total Posts: 773
29 Apr 2017 10:48 AM
got it

local currentvector = workspace.Placing.barricade.Position
workspace.Placing.barricade.Position = Vector3.new(currentvector.X,3.928,currentvector.Z)\

works thx
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
29 Apr 2017 10:48 AM
Because you need to define CurrentVector. Set it to the current vector you are changing.


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