# C# beginner coding issue

**URL:** <https://discussions.unity.com/t/c-beginner-coding-issue/903939>\
**Category:** C# & .NET\
**Tags:** Scripting, Question\
**Created:** [December 21, 2022, 8:03pm UTC](https://discussions.unity.com/t/c-beginner-coding-issue/903939 "2022-12-21T20:03:12Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Ennocu](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/ennocu/32/399379_2.png) [@Ennocu](https://discussions.unity.com/u/Ennocu)\
**Post date:** [December 21, 2022, 9:11pm UTC](https://discussions.unity.com/t/c-beginner-coding-issue/903939/2 "2022-12-21T21:11:38Z")

</div>

Hello !

First of all, you should use the code insert tool in the toolbox. Like this, you can past your code and make it far easier to read ! ( [Using code tags properly](https://discussions.unity.com/t/481379) )

As for your issue, I past your code into a little script and I didn’t experienced any issue.  
I saw no problem in your `Update()` loop so far… I believe the problem might be hidden somewhere else…  
Do you have another script on your object or are you sure you had the focus on your game panel while in play mode ?

---

_[View the full topic](https://discussions.unity.com/t/c-beginner-coding-issue/903939)._
