Script:
Error:
(line 25 is the 3rd line)
āStageNotificationUIā is a string.
yeah but i need to :TweenSize it
A string is not a UI object. TweenSize is a method to change the size of a UI object over time.
A string is just a data type that is text. Itās not a UI object that is being rendered with a size. You are thinking of a TextLabel.
why are you attempting to tween the size of a string? the string is not a UI object. itās just text. if you want to tween the size of a text gui, then tween the size of a textlabel.
i am trying to tween the size of a textlabel
You have to TweenSize the label you put it in not āitā as its just a string not something visible on your screen.
You canāt change text you have to change what displays the said text and you also need to put that text on something to see it like a TextLabel inside a ScreenGui.
it doesnāt seem that you have a textlabel to tween, though. I suggest setting the Text of a TextLabel to the string, and then tweening the size of the TextLabel. The TextLabel is a UI object
Is āStageNotificationUIā a TextLabel?
yes the variable is set to a textlabel
you are setting StageNotificationUI to "Stage " ⦠StageReached ⦠āReached!ā
this is setting it to a string.
You may have set StageNotificationUI to a TextLabel earlier, but it is now a string.
instead of
StageNotificationUI = "Stage " .. StageReached .. "Reached!"
do
StageNotificationUI.Text = "Stage " .. StageReached .. "Reached!"
If āStageNotificationUIā is a TextLabel doing StageNotificationUI = StringHere
will just set the variable called āStageNotificationUIā to āStringHereā.
What youāre suppose to do is this:
StageNotificationUI.Text = StringHere
StageNotificationUI.Text means the Text StageNotificationUI displays.
try changing the top part to
StageNotificationEvent.OnClientEvent:Connect(function(player, StageReached)
if that doesnt work than the issue is StageReached
Show me the serverScript that fires the remote
It doesnāt take the player itās OnServerEvent which takes the player, this wonāt work.
Try replacing StageNotificationUI with StageReached on the 2 TweenSize functions.
I also suggest you to use UI services in a localscript rather than in global.