Issue with specific position

I’ve been trying to make the Y position on my part higher in a script from its original point.
This is what I’ve tried:

script.Parent.Position.Y = Vector2.new(2)

Or

script.Parent.Position.Y = Vector3.new(2)

Anyone know how to sort this out?

You can’t set those directly. Change it like so

script.Parent.Position += Vector3.new(0,2,0)
1 Like

For part positioning, you should use Vector3, although if you are referencing an individual vector then neither is required. Try doing something like this:

local Part = script.Parent -- Make the part a variable
Part.Position.Y = Part.Position.Y + 2 -- Add two to the Y vector
1 Like