Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you add two Vector3 values?

Asked by 2 years ago

Hey, just a quick question thing. How can you add two Vector3 values? Do you just do

Vector3.new(12, 0, 9) + Vector3.new(-9, 0, 19)
1
ya... you can literally test it in studio greatneil80 2647 — 2y

2 answers

Log in to vote
0
Answered by 2 years ago

Add two vector3 in vars

local v = Vector3.new(12, 0, 9) + Vector3.new(-9, 0, 19)

Add vector3 to object's property

game.Workspace.Part.Position += Vector3.new(10,10,10)

Print added vector3s

print(Vector3.new(10,10,10) + Vector3.new(10,10,10))
0
Dont use a + between Vector3.new(10,10,10) and Vector3.new(10,10,10) jus use a double point so you will get someting like this: print(Vector3.new(10,10,10) .. Vector3.new(10,10,10)) mkn00b 5 — 2y
0
He asked for adding, not printing it both AProgrammR 398 — 2y
Ad
Log in to vote
0
Answered by
mkn00b 5
2 years ago

don't use a + between Vector3.new(10,10,10) and Vector3.new(10,10,10) just use a double point, something like this

Print(Vector3.new(10,10,10)..Vector3.new(10,10,10))

Answer this question