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

Script works but for some reason it has a very long debounce??? [SOLVED]

Asked by 4 years ago
Edited 4 years ago

This question has been solved by the original poster.

I made a text script for dialogue, It works perfectly but the only problem is when its finished it has a debounce i never specified which is extremely long i dont understand why it does so can you guys help me understand? here is the starting script

01script.Parent.Touched:Connect(function(part)
02 
03    local plr = game.Players:GetPlayerFromCharacter(part.Parent)
04    if plr then
05 
06 
07        plr:WaitForChild("PlayerGui").Text.Enabled = true
08        local msg = "Howdy folks"
09    local text = msg
10 
11local Texty = plr:WaitForChild("PlayerGui").Text.TextLabel
12for i = 1,#text do
13Texty.Text = string.sub(text,1,i)
14local cor = coroutine.wrap(function()
15local sound = Instance.new("Sound")
View all 32 lines...

Here is the script that handles the real dialogue and u talking also

01local line = script.Parent.Value.Value
02script.Parent.MouseButton1Click:Connect(function()
03    if line == 1 then
04    script.Parent.Parent.Enabled = false
05local msg = "This is a test"
06    local text = msg
07local plr = game.Players.LocalPlayer
08local Texty = script.Parent.Parent.Parent.Text.TextLabel
09Texty.Parent.Enabled = true
10for i = 1,#text do
11Texty.Text = string.sub(text,1,i)
12local cor = coroutine.wrap(function()
13local sound = Instance.new("Sound")
14sound.Volume = .5
15sound.SoundId = "rbxassetid://151715959"
View all 61 lines...

i would appreciate it alot if u take ur time to read this and help me thanks

0
if u need any more information tell me and ill give it TheUltimateTNTFriend 109 — 4y
0
What you mean by "bounce"? Can you please explain it more Leamir 3138 — 4y
0
it means when i touch it the text works but then when i try touch it again i cant do it and i have to wait like 100 seconds to do it again TheUltimateTNTFriend 109 — 4y
0
missing end for for loop at line 37 ? Leamir 3138 — 4y
View all comments (9 more)
0
i put the ends at the end of the script TheUltimateTNTFriend 109 — 4y
0
but there should be a end there, or the loop is supposed to run all the rest of the script? Leamir 3138 — 4y
0
it works like this, first button pres text loop appears then it ends then 2nd button press then etc TheUltimateTNTFriend 109 — 4y
0
hello? TheUltimateTNTFriend 109 — 4y
0
are those lines supposed to run #lines times? Leamir 3138 — 4y
0
can you join website chat? its easyer to talk Leamir 3138 — 4y
0
?? TheUltimateTNTFriend 109 — 4y
0
wut is website talk? TheUltimateTNTFriend 109 — 4y
0
fix your indentation VerdommeMan 1479 — 4y

Answer this question