i'm making a story game and i want to make 2 text labels visible and after a few word its not, with a script in ServerScriptService this is my script so far game.StarterGui.MainGui.Speaker.Visible = true game.StarterGui.MainGui.Text.Visible = true but it doesn't seem to work
hmm easy fix
01 | local TextLabel = game.StarterGui.MainGui.Text |
02 | local Text |
03 | local Speaker = game.StarterGui.MainGui.Speaker |
04 |
05 | --just incase you didn't add one of these effects ima add it for you |
06 | function setText(word) |
07 | Text = word |
08 | for i = 1 , #Text do |
09 | textLabel.Text = string.sub(Text, 1 , i) |
10 | wait( 0.04 ) |
11 | end |
12 | end |
13 |
14 | while wait() do |
15 | if TextLabel.Visible = = true then |
Hope this helps!
Wrong, wrong, wrong. If you have FilteringEnabled, it won't work on a script. You have to use a LOCAL SCRIPT, INSIDE OF STARTERGUI. Use it like this: Local Script => StarterGui <= MainGui AND proceed like this:
01 | local TextLabel = script.Parent:WaitForChild( "MainGui" ).Text |
02 | local Text |
03 | local Speaker = script.Parent:WaitForChild( "MainGui" ).Speaker |
04 |
05 | -- functions |
06 | function setText(word) |
07 | Text = word |
08 | for i = 1 , #Text do |
09 | TextLabel.Text = string.sub(Text, 1 , i) |
10 | wait( 0.04 ) |
11 | end |
12 | end |
13 |
14 | while wait() do |
15 | if TextLabel.Visible = = true then |
Copied from one answer BUT fixed.
Closed as Not Constructive by BestCreativeBoy, Dovydas1118, and imKirda
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?