---
title: "speed(to:duration:)"
framework: spritekit
role: symbol
role_heading: Type Method
path: "spritekit/skaction/speed(to:duration:)"
---

# speed(to:duration:)

Creates an action that changes how fast the node executes actions.

## Declaration

```swift
class func speed(to speed: CGFloat, duration: TimeInterval) -> SKAction
```

## Parameters

- `speed`: The new value for the node’s speed.
- `duration`: The duration of the animation.

## Return Value

Return Value A new action object.

## Discussion

Discussion When the action executes, the node’s speed property animates to the new value. This action is not reversible; the reverse of this action has the same duration but does not change anything.

## See Also

### Controlling the Action’s Speed

- [speed(by:duration:)](spritekit/skaction/speed(by:duration:).md)
