# Chapter 6 Void to Bool Error

**URL:** <https://forums.kodeco.com/t/chapter-6-void-to-bool-error/33232>\
**Category:** Unity Games by Tutorials\
**Created:** [August 12, 2017, 11:23pm UTC](https://forums.kodeco.com/t/chapter-6-void-to-bool-error/33232 "2017-08-12T23:23:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vsummer7](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/vsummer7/32/70034_2.png) [@vsummer7](https://forums.kodeco.com/u/vsummer7)\
**Post date:** [August 12, 2017, 11:23pm UTC](https://forums.kodeco.com/t/chapter-6-void-to-bool-error/33232/1 "2017-08-12T23:23:51Z")

</div>

Hi, I get an error saying that I cannot implicitly convert a void to bool.  
Here is my PlayerController Script.

void FixedUpdate()  
{  
Vector3 moveDirection = new Vector3(Input.GetAxis(“Horizontal”),  
0, Input.GetAxis(“Vertical”));  
if bodyAnimator.SetBool(“IsMoving”, false);

```
    // TODO
    else {
        bodyAnimator.SetBool("IsMoving", true);
        head.AddForce(transform.right * 150, ForceMode.Acceleration);
    }

```

The error is with bodyAnimator.SetBool(“IsMoving”, false);

Thank you.

---

<div class="post-metadata">

**Author:** ![system](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@system](https://forums.kodeco.com/u/system)\
**Post date:** [January 26, 2018, 3:24pm UTC](https://forums.kodeco.com/t/chapter-6-void-to-bool-error/33232/2 "2018-01-26T15:24:00Z")

</div>

Closed on January 26, 2018, 3:24pm UTC

This topic was automatically closed after 166 days. New replies are no longer allowed.
