✓ Accepted answer
I know you already fixed this, but I'd just like to give some basic insight as to why this happens.
Variables in RLua have many types (ex. Bool, String, Instance, etc.)
When you save a variable like you did before
Reference:
local Text = Gui.Notification.Text
It saves the Text property of the Instance as a String variable. This means that when you change it later in your code, it isn't changing the text that is on the TextLabel, it is changing the Text variable.
Example:
local textLabel = Instance.new('TextLabel')
textLabel.Text = 'foo'
local Text = textLabel.Text
print(Text)
textLabel.Text = 'bar'
print(Text)
The way to do what you were trying to do correctly (as you already found out) is to save the Text variable as the TextLabel's Instance. (Or just reference the TextLabel directly every time)
Example:
local textLabel = Gui.Notification
textLabel.Text = 'foo'
Gui.Notification.Text = 'foo'
Doing this allows you to change the instance's Text property directly, instead of what you did before (saving the text property as a variable).
2 comments
btw, when I print text in console it showed the updated text.
Fixed it, just don't use a variable and = it directly.