Why godot acts like there are no scripts ??

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Jonus

So i added script to my project but godot acts like there are no scipts and nothing works when i try to run it, here is my code:

extends KinematicBody2D   
                                                                                                 
func _rotation(delta):
   look_at(get_global_mouse_position())
:bust_in_silhouette: Reply From: MrEliptik

If you only have this functions in your script, it’s just never get called.

In GDscript, when your scripts extend a Node derived class, it inherits some functions, such as _ready(), _process() or _physics_process(). See Node — Godot Engine (stable) documentation in English for more information.

If you want your function to be called as often as possible, call it under _process() :

func _process(delta):
    _rotation(delta)

It should work as intended after that.