# Vector3.WithY

```csharp
Vector3 WithY(float y)
```

Returns this vector with given Y component.

### Parameters

- `y` (`float`): The override for Y component.

### Returns

`Vector3`: The new vector.

Declared in [Vector3](/api/Vector3).
Assembly: `Sandbox.System`.
