Godot Version
4.6
Question
Hiiiii! I feel as though im being silly here, but im trying to make a randomizer for a small project im making, but its not working- its not even printing anything?
extends Sprite2D
func on_timer_timeout():
var roll_result = Globals.roll_num.randi_range(1,10)
if roll_result >= 5:
visible = false
print("goodbye")
else:
visible = true
print("Hello")
(This is on a sprite node, which has a timer as a child)
Oh and globals script ![]()
extends Node
var roll_num = RandomNumberGenerator.new()
again, i feel as though im being silly haha, but thanks for helping<333