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

How do you make a text appear when you click something?

Asked by 3 years ago
Edited 3 years ago

I have tried to make a text when a door is clicked but now i have decided that i want to clone a screengui instead can someone give a script. I tried to use the clone() function before and has not worked. I have even used this and still it does not work.

this is the script

01script.Parent.Text.Value = false
02local value = script.Parent.Text.Value
03 
04workspace.doortext.ClickDetector.MouseClick:Connect(function()
05    if game.StarterGui.ScreenGui.Value.Value == true then
06        if workspace.Breakabl2.Anchored == true then
07            if value == false then
08                value = true
09                script.Parent.Sound:Play()
10                script.Parent.TextLabel.Text = "I"
11                wait(0.2)
12                script.Parent.TextLabel.Text = "I t"
13                wait(0.2)
14                script.Parent.TextLabel.Text = "I th"
15                wait(0.2)
View all 56 lines...

2 answers

Log in to vote
0
Answered by 3 years ago
Edited 3 years ago

Try using debounce:

01local debounce = false
02 
03workspace.doortext.ClickDetector.MouseClick:Connect(function()
04        if workspace.Breakabl2.Anchored == true then
05            if not debounce then
06                debounce = true
07                script.Parent.Sound:Play()
08                script.Parent.TextLabel.Text = "I"
09                wait(0.2)
10                script.Parent.TextLabel.Text = "I t"
11                wait(0.2)
12                script.Parent.TextLabel.Text = "I th"
13                wait(0.2)
14                script.Parent.TextLabel.Text = "I thi"
15                wait(0.2)
View all 55 lines...

tell me if there is something wrong ok?

0
Ok superbestguy567 0 — 3y
0
did it work? GameBuilderLol 58 — 3y
0
no superbestguy567 0 — 3y
Ad
Log in to vote
0
Answered by 3 years ago

no it didn't is there a easier way like clone and also this is the script its the same way you sent me

01local debounce = false
02 
03workspace.doortext.ClickDetector.MouseClick:Connect(function()
04        if workspace.Breakabl2.Anchored == true then
05            if not debounce then
06                debounce = true
07                script.Parent.Sound:Play()
08                script.Parent.TextLabel.Text = "I"
09                wait(0.2)
10                script.Parent.TextLabel.Text = "I t"
11                wait(0.2)
12                script.Parent.TextLabel.Text = "I th"
13                wait(0.2)
14                script.Parent.TextLabel.Text = "I thi"
15                wait(0.2)
View all 55 lines...
0
Can you tell me what happened when you tried to test it? GameBuilderLol 58 — 3y

Answer this question