Hello,
i know it sounds confusing but what i want is to get only the first, and last value of a vector3 value
Example:
I have a vector3 value: (1,5,2)
And i only want 1 and 2
i want the 5 to stay like it is
How would i do that?
Hello,
i know it sounds confusing but what i want is to get only the first, and last value of a vector3 value
Example:
I have a vector3 value: (1,5,2)
And i only want 1 and 2
i want the 5 to stay like it is
How would i do that?
Split the vector into it’s respective parts.
local Position = Vector3.new(1, 5, 2)
local X, Y, Z = Position.X, Position.Y, Position.Z
print(X, Z) -- 1, 2
Thanks, but How would i go about changing the Y while keeping the Z and X the same?
local Old = Vector3.new(1, 5, 2)
local X, Y, Z = Position.X, Position.Y, Position.Z
local New = Vector3.new(X, 1, Z) -- Change 1 to new value.
print(New) -- (1, 1, 2)
Understood it now, thanks, appreciate it.