Chelimbalo/scripts/multiplayer/own_visibility_toggle.gd
2025-11-29 23:46:16 +05:00

9 lines
264 B
GDScript

extends Node
@export var visible_for_others: bool = false
func _ready() -> void:
get_parent().visible = (get_multiplayer_authority() != multiplayer.get_unique_id()) == visible_for_others
func reverse() -> void:
get_parent().visible = not get_parent().visible