godotengine / godotengine/godot-docs

Where to find the script property

Open
#5,041 8 comments 0 reactions 0 assignees View on GitHub
area:class reference enhancement
Dominant language
reStructuredText
Stars
5.7k
Forks
3.8k
Avg merge
1d 20h
Merged PRs (30d)
25

Description

**Your Godot version:** 3.3.2 stable, latest

**Issue description:**

In the bottom of every node in the scene tree there is the script property, telling me what script is attached to my node.
This script property appears to be a property of the Node class:

![image](https://user-images.githubusercontent.com/47016402/123126046-5a712e00-d449-11eb-814f-00c9beb728ab.png)

However when browsing the Node class I can't find this property: [Node class properies](https://docs.godotengine.org/en/stable/classes/class_node.html#properties)

The object class has a method called [set_script()](https://docs.godotengine.org/en/3.1/classes/class_object.html#class-object-method-set-script), but no script property either.

When I hover with my mouse over the script property in the inspector, it clearly says the property name is "script":

![image](https://user-images.githubusercontent.com/47016402/123126924-192d4e00-d44a-11eb-9c74-35b393b570e4.png)

I can even assign a script at will using `$my_node.script = preload("res://script_name.gd")`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.