Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

i need help with 2 text labels do you think you can help me? [closed]

Asked by
sameb556 -12
4 years ago
Edited 4 years ago

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

1
https://idownvotedbecau.se/NoEffort Google search exists. Use it User#30567 0 — 4y

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?

2 answers

Log in to vote
0
Answered by 4 years ago

hmm easy fix

01local TextLabel = game.StarterGui.MainGui.Text
02local Text
03local Speaker = game.StarterGui.MainGui.Speaker
04 
05--just incase you didn't add one of these effects ima add it for you
06function 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
12end
13 
14while wait() do
15    if TextLabel.Visible == true then
View all 26 lines...

Hope this helps!

0
The effect i added makes it look like someone is typing the words out live instead of all the words popping up at once. MarcTheRubixQb 153 — 4y
1
did you even test it? i didn't test it and I already know it doesn't work >-< User#30567 0 — 4y
Ad
Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

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:

01local TextLabel = script.Parent:WaitForChild("MainGui").Text
02local Text
03local Speaker = script.Parent:WaitForChild("MainGui").Speaker
04 
05-- functions
06function 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
12end
13 
14while wait() do
15    if TextLabel.Visible == true then
View all 26 lines...

Copied from one answer BUT fixed.

0
what is FilteringEnabled? sameb556 -12 — 4y
0
something to prevent exploiters from hacking and affecting everything. krowten024nabrU 463 — 4y
0
something to prevent exploiters from hacking and affecting everything. krowten024nabrU 463 — 4y