---
title: "fadeOut(withDuration:)"
framework: spritekit
role: symbol
role_heading: Type Method
path: "spritekit/skaction/fadeout(withduration:)"
---

# fadeOut(withDuration:)

Creates an action that changes the alpha value of the node to 0.0.

## Declaration

```swift
class func fadeOut(withDuration duration: TimeInterval) -> SKAction
```

## Parameters

- `duration`: The duration of the animation.

## Mentioned in

Getting Started with Actions

## Return Value

Return Value A new action object.

## Discussion

Discussion When the action executes, the node’s alpha property animates from its current value to 0.0. This causes the node to disappear. This action is reversible; the reverse is created as if the following code is executed:

## See Also

### Animating the Transparency of a Node

- [fadeIn(withDuration:)](spritekit/skaction/fadein(withduration:).md)
- [fadeAlpha(by:duration:)](spritekit/skaction/fadealpha(by:duration:).md)
- [fadeAlpha(to:duration:)](spritekit/skaction/fadealpha(to:duration:).md)
